finished the talking animations

This commit is contained in:
Rizvee committed 2022-02-22 15:21:38 -06:00
1 parent e19a363e42
commit 65e0fe9510
8 files changed
+288 -25

No files matched your search

@@ -25,6 +25,15 @@ AnimationClip:
path:
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- time: 0.25
value: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
attribute: m_Sprite
path:
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_SampleRate: 4
m_WrapMode: 0
m_Bounds:
@@ -39,14 +48,23 @@ AnimationClip:
typeID: 212
customType: 23
isPPtrCurve: 1
- serializedVersion: 2
path: 0
attribute: 2015549526
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 6776477941202382221, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.25
m_StopTime: 0.5
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@@ -25,6 +25,15 @@ AnimationClip:
path:
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- time: 0.25
value: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
attribute: m_Sprite
path:
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_SampleRate: 4
m_WrapMode: 0
m_Bounds:
@@ -39,14 +48,23 @@ AnimationClip:
typeID: 212
customType: 23
isPPtrCurve: 1
- serializedVersion: 2
path: 0
attribute: 2015549526
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 1232664573060430783, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.25
m_StopTime: 0.5
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@@ -21,10 +21,12 @@ AnimationClip:
- curve:
- time: 0
value: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- time: 0.25
value: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_SampleRate: 4
m_WrapMode: 0
m_Bounds:
@@ -34,19 +36,20 @@ AnimationClip:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
attribute: 2015549526
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.25
m_StopTime: 0.5
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@@ -27,6 +27,15 @@ AnimationClip:
path:
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- time: 0.5
value: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
attribute: m_Sprite
path:
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_SampleRate: 4
m_WrapMode: 0
m_Bounds:
@@ -41,15 +50,24 @@ AnimationClip:
typeID: 212
customType: 23
isPPtrCurve: 1
- serializedVersion: 2
path: 0
attribute: 2015549526
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 1232664573060430783, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- {fileID: 5625398474919881811, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.5
m_StopTime: 0.75
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@@ -27,6 +27,15 @@ AnimationClip:
path:
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- time: 0.25
value: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
attribute: m_Sprite
path:
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_SampleRate: 4
m_WrapMode: 0
m_Bounds:
@@ -41,9 +50,18 @@ AnimationClip:
typeID: 212
customType: 23
isPPtrCurve: 1
- serializedVersion: 2
path: 0
attribute: 2015549526
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- {fileID: 5354992726988596434, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
+23 -9
View File
@@ -5,10 +5,12 @@ using TMPro;
public class Dialogue : MonoBehaviour
{
public Animator animator;
public TMP_Text textbox;
public TMP_Text arrow;
public AudioManager audioManager;
public List<string> pages = new List<string>();
public List<int> emotes = new List<int>();
int curPage = 0;
public bool isOpen = true;
//used to activate/deactivate test object
@@ -20,6 +22,8 @@ public class Dialogue : MonoBehaviour
//in seconds
float pace = 0.05f;
float elapsed = 0f;
//turns off and on sound
public bool isTalking;
// Start is called before the first frame update
void Start()
{
@@ -46,6 +50,10 @@ public class Dialogue : MonoBehaviour
//checks if all of the characters are on the page
if(cCount >= pages[curPage].Length)
{
//stops the animation
if(animator != null && emotes.Count == pages.Count) {
animator.SetInteger("Animation",emotes[curPage] - 1);
}
//prints the "next" arrow when at end of page except last page
if(curPage < pages.Count - 1)
{
@@ -78,6 +86,10 @@ public class Dialogue : MonoBehaviour
}
else
{
//starts the animation
if(animator != null && emotes.Count == pages.Count) {
animator.SetInteger("Animation",emotes[curPage]);
}
//writes chars at specified pace
elapsed += Time.deltaTime;
if(elapsed > pace)
@@ -85,15 +97,17 @@ public class Dialogue : MonoBehaviour
++cCount;
textbox.text = pages[curPage].Substring(0, cCount);
elapsed = 0;
int RNGSound = Random.Range(0, 2);
if (RNGSound == 0) {
audioManager.Play("blip");
Debug.Log("blip");
}
else
{
audioManager.Play("blop");
Debug.Log("blop");
if(isTalking){
int RNGSound = Random.Range(0, 2);
if (RNGSound == 0) {
audioManager.Play("blip");
Debug.Log("blip");
}
else
{
audioManager.Play("blop");
Debug.Log("blop");
}
}
}
//skip ahead
+115 -5
View File
@@ -69,7 +69,7 @@ MonoBehaviour:
m_text: '>'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8bd1780577b8eaf43ad60554189eb11e, type: 2}
m_sharedMaterial: {fileID: 1974643164809013703, guid: 8bd1780577b8eaf43ad60554189eb11e, type: 2}
m_sharedMaterial: {fileID: -6507631187338287659, guid: 8bd1780577b8eaf43ad60554189eb11e, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
@@ -222,7 +222,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -145}
m_SizeDelta: {x: 650, y: 130}
m_SizeDelta: {x: 450, y: 130}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &432280968903316581
CanvasRenderer:
@@ -313,6 +313,113 @@ SpriteRenderer:
m_WasSpriteAssigned: 0
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1650953887092304983
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8637085924552831791}
- component: {fileID: 4883996976931216989}
- component: {fileID: 9032403516113401987}
m_Layer: 5
m_Name: Headshot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8637085924552831791
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650953887092304983}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 30, y: 30, z: 0.41666666}
m_Children: []
m_Father: {fileID: 7059772332581294261}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -286, y: -147}
m_SizeDelta: {x: 3.125, y: 3.125}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!212 &4883996976931216989
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650953887092304983}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1458967083
m_SortingLayer: 3
m_SortingOrder: 0
m_Sprite: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 3.125, y: 3.125}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 0
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!95 &9032403516113401987
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1650953887092304983}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 0}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &7059772332122756754
GameObject:
m_ObjectHideFlags: 0
@@ -413,6 +520,7 @@ RectTransform:
- {fileID: 3633192429854996722}
- {fileID: 7059772333148747625}
- {fileID: 8800572322419699558}
- {fileID: 8637085924552831791}
m_Father: {fileID: 7059772333487008124}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: -36.808, y: 0, z: 0}
@@ -430,7 +538,7 @@ Canvas:
m_GameObject: {fileID: 7059772332581294260}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_RenderMode: 1
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
@@ -494,8 +602,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4098cb6d8f351b44ca98b3bb6311f330, type: 3}
m_Name:
m_EditorClassIdentifier:
animator: {fileID: 9032403516113401987}
textbox: {fileID: 7059772333148747626}
arrow: {fileID: 7395190149993767727}
audioManager: {fileID: 0}
pages: []
isOpen: 0
textTest: {fileID: 7059772332581294260}
@@ -534,7 +644,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -118}
m_AnchoredPosition: {x: 10, y: -118}
m_SizeDelta: {x: 400, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7059772333148747627
@@ -568,7 +678,7 @@ MonoBehaviour:
m_text: a quick brown fox jumps over the lazy dog
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8bd1780577b8eaf43ad60554189eb11e, type: 2}
m_sharedMaterial: {fileID: 1974643164809013703, guid: 8bd1780577b8eaf43ad60554189eb11e, type: 2}
m_sharedMaterial: {fileID: -6507631187338287659, guid: 8bd1780577b8eaf43ad60554189eb11e, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
+65 -1
View File
@@ -1540,10 +1540,22 @@ PrefabInstance:
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2814996999539020984, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: 7eb4fdbc838e84a8e83347d54fd48aa6, type: 2}
- target: {fileID: 3633192429854996722, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_SizeDelta.x
value: 450
objectReference: {fileID: 0}
- target: {fileID: 3758862681294202868, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: isOpen
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3758862681294202868, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: isTalking
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3758862681294202868, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: audioManager
value:
@@ -1552,6 +1564,10 @@ PrefabInstance:
propertyPath: pages.Array.size
value: 3
objectReference: {fileID: 0}
- target: {fileID: 3758862681294202868, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: emotes.Array.size
value: 3
objectReference: {fileID: 0}
- target: {fileID: 3758862681294202868, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: pages.Array.data[0]
value: blah blah balaba blaha balh blah blah blah blah
@@ -1564,6 +1580,34 @@ PrefabInstance:
propertyPath: pages.Array.data[2]
value: congrats you won
objectReference: {fileID: 0}
- target: {fileID: 3758862681294202868, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: emotes.Array.data[0]
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3758862681294202868, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: emotes.Array.data[1]
value: 3
objectReference: {fileID: 0}
- target: {fileID: 3758862681294202868, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: emotes.Array.data[2]
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4883996976931216989, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- target: {fileID: 4883996976931216989, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_WasSpriteAssigned
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5606136381310298672, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: -8109058881888065430, guid: f99a1e623eb554e4aa4314aba18b2531, type: 3}
- target: {fileID: 5606136381310298672, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7059772332581294261, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_Pivot.x
value: 0
@@ -1622,7 +1666,7 @@ PrefabInstance:
objectReference: {fileID: 519420031}
- target: {fileID: 7059772332581294264, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_RenderMode
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7059772332581294264, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_SortingOrder
@@ -1696,6 +1740,22 @@ PrefabInstance:
propertyPath: m_SortingOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8637085924552831791, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_LocalScale.x
value: 38.5
objectReference: {fileID: 0}
- target: {fileID: 8637085924552831791, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_LocalScale.y
value: 38.5
objectReference: {fileID: 0}
- target: {fileID: 8637085924552831791, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_AnchoredPosition.x
value: -294.94
objectReference: {fileID: 0}
- target: {fileID: 8637085924552831791, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_AnchoredPosition.y
value: -145.13
objectReference: {fileID: 0}
- target: {fileID: 8800572322419699558, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_LocalRotation.w
value: 0.6883546
@@ -1712,5 +1772,9 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: -93
objectReference: {fileID: 0}
- target: {fileID: 9032403516113401987, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: 7eb4fdbc838e84a8e83347d54fd48aa6, type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6ea336e93a8128346aad568255a7e6af, type: 3}