Wizard Animation Upgrade

This commit is contained in:
Jakub Sztuba 2023-01-05 14:53:42 +01:00
parent a4d969e2be
commit 45cbbc3b3d
9 changed files with 205 additions and 17 deletions

View File

@ -1,5 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1101 &-5806975412209012471
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: isRunning
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 5154281723833786323}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1107 &-3621334542891261866
AnimatorStateMachine:
serializedVersion: 6
@ -15,6 +40,9 @@ AnimatorStateMachine:
- serializedVersion: 1
m_State: {fileID: 5154281723833786323}
m_Position: {x: 420, y: 210, z: 0}
- serializedVersion: 1
m_State: {fileID: -439700991718221505}
m_Position: {x: 800, y: -20, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
@ -124,6 +152,33 @@ BlendTree:
m_UseAutomaticThresholds: 1
m_NormalizedBlendValues: 0
m_BlendType: 1
--- !u!1102 &-439700991718221505
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: WizardFrontIdle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: -5806975412209012471}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 90f3fe0e624b43c44b515016d52dfbae, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
@ -151,6 +206,18 @@ AnimatorController:
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: TurnBack
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: TurnFront
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@ -172,6 +239,9 @@ AnimatorStateTransition:
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: TurnFront
m_EventTreshold: 0
- m_ConditionMode: 2
m_ConditionEvent: isRunning
m_EventTreshold: 0
@ -189,6 +259,34 @@ AnimatorStateTransition:
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &3909964258867045483
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: isRunning
m_EventTreshold: 0
- m_ConditionMode: 1
m_ConditionEvent: TurnFront
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -439700991718221505}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &5154281723833786323
AnimatorState:
serializedVersion: 6
@ -201,6 +299,7 @@ AnimatorState:
m_CycleOffset: 0
m_Transitions:
- {fileID: 3234619281913491369}
- {fileID: 3909964258867045483}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0

View File

@ -39649,6 +39649,10 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 1393757793}
m_Modifications:
- target: {fileID: -7576677615092044163, guid: 417d111e604a8124cb960805d809e513, type: 3}
propertyPath: speed
value: 1.3
objectReference: {fileID: 0}
- target: {fileID: -7576677615092044163, guid: 417d111e604a8124cb960805d809e513, type: 3}
propertyPath: isChasing
value: 0

View File

@ -87,7 +87,16 @@ public class NPCFollowing : MonoBehaviour
//start dialogue here
gameObject.GetComponent<NPC>().State = NPCStateEnum.Talking;
anim.SetBool("isRunning", false);
if (targetPosition.position.y > transform.position.y)
{
anim.SetBool("TurnFront",true);
anim.SetBool("isRunning", false);
}
else
{
anim.SetBool("TurnFront",false);
anim.SetBool("isRunning", false);
}
agent.path.Clear(); // if we are able to talgk we dont want go go further player
}
}

View File

@ -21,15 +21,15 @@ AnimationClip:
- curve:
- time: 0
value: {fileID: 8686923130848968836, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.083333336
value: {fileID: 2429924255151692236, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.16666667
value: {fileID: 2429924255151692236, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.33333334
value: {fileID: -1549776866798367382, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 12
m_SampleRate: 6
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
@ -52,7 +52,7 @@ AnimationClip:
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

View File

@ -0,0 +1,68 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: WizardFrontIdle
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 1425329180273031634, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 12
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
pptrCurveMapping:
- {fileID: 1425329180273031634, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.083333336
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 90f3fe0e624b43c44b515016d52dfbae
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -21,15 +21,15 @@ AnimationClip:
- curve:
- time: 0
value: {fileID: 5831712680124928391, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.083333336
value: {fileID: 7058171408329882253, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.16666667
value: {fileID: 7058171408329882253, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.33333334
value: {fileID: 5758504133813651979, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 12
m_SampleRate: 6
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
@ -52,7 +52,7 @@ AnimationClip:
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

View File

@ -21,15 +21,15 @@ AnimationClip:
- curve:
- time: 0
value: {fileID: -6546816321944170997, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.083333336
value: {fileID: -2446265752164650608, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.16666667
value: {fileID: -2446265752164650608, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.33333334
value: {fileID: -2017559570444700374, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 12
m_SampleRate: 6
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
@ -52,7 +52,7 @@ AnimationClip:
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

View File

@ -21,15 +21,15 @@ AnimationClip:
- curve:
- time: 0
value: {fileID: 3351906410715979375, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.083333336
value: {fileID: 1425329180273031634, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.16666667
value: {fileID: 1425329180273031634, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
- time: 0.33333334
value: {fileID: -2357918661749186383, guid: a618c1a6d5f6e29438eeadfa55fcea33, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
m_SampleRate: 12
m_SampleRate: 6
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
@ -52,7 +52,7 @@ AnimationClip:
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