Wizard animation and Cave fix

This commit is contained in:
Jakub Sztuba 2023-01-17 16:39:59 +01:00
parent c28ea23a36
commit 5bacdb308e
6 changed files with 351 additions and 10 deletions

View File

@ -0,0 +1,317 @@
%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
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -3123819037744566438}
m_Position: {x: 420, y: 80, z: 0}
- 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: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: -3123819037744566438}
--- !u!1102 &-3123819037744566438
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: WizardIdle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: -2030680816099414090}
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: 955446ad3a4db2b4780f05c45d05c5c8, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-2030680816099414090
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!206 &-1264004586810225053
BlendTree:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blend Tree
m_Childs:
- serializedVersion: 2
m_Motion: {fileID: 7400000, guid: b900c5133de323a46a58498a00abc987, type: 2}
m_Threshold: 0
m_Position: {x: 0, y: 1}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 7400000, guid: 3233cd06998b20547adc8836d0a3f51a, type: 2}
m_Threshold: 0.33333334
m_Position: {x: 0, y: -1}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 7400000, guid: 442fd2520a0fbc045b9cf62740455d3e, type: 2}
m_Threshold: 0.6666667
m_Position: {x: -1, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 7400000, guid: e778166e384c02c4692152085cd99b63, type: 2}
m_Threshold: 1
m_Position: {x: 1, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
m_BlendParameter: moveXWizardTalk
m_BlendParameterY: moveYWizardTalk
m_MinThreshold: 0
m_MaxThreshold: 1
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
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TalkingWizardController
serializedVersion: 5
m_AnimatorParameters:
- m_Name: isRunning
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: moveXWizardTalk
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: moveYWizardTalk
m_Type: 1
m_DefaultFloat: 0
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
m_StateMachine: {fileID: -3621334542891261866}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &3234619281913491369
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: TurnFront
m_EventTreshold: 0
- m_ConditionMode: 2
m_ConditionEvent: isRunning
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -3123819037744566438}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
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
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blend Tree
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 3234619281913491369}
- {fileID: 3909964258867045483}
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: -1264004586810225053}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b6740e2d4864c904a9f50678c47ef63b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -34,7 +34,6 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -20.848145, y: 18.195751, z: 133.20683}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6451347682704892650}
m_Father: {fileID: 0}
@ -51,7 +50,6 @@ SpriteRenderer:
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
@ -131,7 +129,7 @@ CircleCollider2D:
m_Radius: 1.5
--- !u!95 &6815460739701989453
Animator:
serializedVersion: 4
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@ -139,12 +137,11 @@ Animator:
m_GameObject: {fileID: 872844846741150860}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 7d09ffbc6c0aa7c409b8da27c69433bd, type: 2}
m_Controller: {fileID: 9100000, guid: b6740e2d4864c904a9f50678c47ef63b, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
@ -257,7 +254,6 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 872844846741150863}
m_RootOrder: 0

View File

@ -1654,7 +1654,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 12
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &148988773
MonoBehaviour:
@ -2583,6 +2583,10 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6815460739701989453, guid: d17e5507719af6d41a75c8fe7ae731bf, type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: b6740e2d4864c904a9f50678c47ef63b, type: 2}
- target: {fileID: 7400036343426951234, guid: d17e5507719af6d41a75c8fe7ae731bf, type: 3}
propertyPath: CanBeOpened
value: 0
@ -73977,6 +73981,7 @@ GameObject:
- component: {fileID: 1458715760}
- component: {fileID: 1458715766}
- component: {fileID: 1458715765}
- component: {fileID: 1458715768}
m_Layer: 0
m_Name: UiManager
m_TagString: Untagged
@ -74121,6 +74126,18 @@ MonoBehaviour:
m_EditorClassIdentifier:
DynamicPanel: {fileID: 0}
keyToOpen: 117
--- !u!114 &1458715768
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1458715758}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3e405827d28ed5344a3b97ebbae780f3, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1463806449
GameObject:
m_ObjectHideFlags: 0
@ -211519,7 +211536,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_RootOrder
value: 13
value: 12
objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalPosition.x

View File

@ -117,7 +117,8 @@ public class AStarPathfindingAgent : MonoBehaviour
moveY = point.y - current.y;
myAnim.SetFloat("Yinfo", moveY);
myAnim.SetFloat("Xinfo", moveX);
myAnim.SetFloat("moveXWizardTalk", moveX);
myAnim.SetFloat("moveYWizardTalk", moveY);

View File

@ -9,7 +9,7 @@ using UnityEngine;
class GetScroolWizard : MonoBehaviour
{
public Item RequiredItem;
private Animator anim;
public MissionReward Reward;
public Transform teleportPosition;
@ -17,6 +17,7 @@ class GetScroolWizard : MonoBehaviour
private void Start()
{
anim = GetComponent<Animator>();
teleportPosition = GameObject.Find("DoorToHell").transform;
}
@ -36,6 +37,7 @@ class GetScroolWizard : MonoBehaviour
public void Escape()
{
Debug.Log("Start courtine");
anim.SetBool("isRunning", true);
StartCoroutine(gameObject.GetComponent<AStarPathfindingAgent>().FollowPath());
}