収穫アニメーション実装
This commit is contained in:
parent
669fdc7600
commit
192caf7784
|
|
@ -27,6 +27,31 @@ AnimatorState:
|
|||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &-6438628141452749478
|
||||
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: BuddingTrigger
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -5787330920990745304}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 1
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1102 &-5787330920990745304
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
|
|
@ -37,7 +62,8 @@ AnimatorState:
|
|||
m_Name: seedling_bud
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_Transitions:
|
||||
- {fileID: 394579965337601277}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
|
|
@ -119,7 +145,13 @@ AnimatorController:
|
|||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: BuddingTrigger
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
|
|
@ -133,6 +165,28 @@ AnimatorController:
|
|||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1101 &394579965337601277
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -7101647891082938139}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 1
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1107 &1585693591985743309
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 5
|
||||
|
|
@ -144,15 +198,16 @@ AnimatorStateMachine:
|
|||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -5202147409423705330}
|
||||
m_Position: {x: 290, y: 10, z: 0}
|
||||
m_Position: {x: 290, y: 230, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -7101647891082938139}
|
||||
m_Position: {x: 288.2871, y: 110.23569, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -5787330920990745304}
|
||||
m_Position: {x: 323.2871, y: 175.23569, z: 0}
|
||||
m_Position: {x: 290, y: 20, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_AnyStateTransitions:
|
||||
- {fileID: -6438628141452749478}
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
|
|
@ -177,7 +232,7 @@ AnimatorStateTransition:
|
|||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.25
|
||||
m_ExitTime: 1
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ public class CornSeedlingView : MonoBehaviour
|
|||
[SerializeField] private GameObject seedlingStage4;
|
||||
[SerializeField] private GameObject growingArrowPrefab;
|
||||
private readonly int nextStageTriggerHash = Animator.StringToHash("NextStageTrigger");
|
||||
private readonly int buddingTriggerHash = Animator.StringToHash("BuddingTrigger");
|
||||
|
||||
public void ResetView()
|
||||
{
|
||||
|
|
@ -54,38 +55,30 @@ public class CornSeedlingView : MonoBehaviour
|
|||
break;
|
||||
case SeedlingStage.Stage1:
|
||||
seedlingStage1.SetActive(true);
|
||||
seedlingStage1.GetComponent<Animator>().SetTrigger(buddingTriggerHash);
|
||||
break;
|
||||
case SeedlingStage.Stage2:
|
||||
seedlingStage1.GetComponent<Animator>().SetTrigger(nextStageTriggerHash);
|
||||
this.CallWaitForSeconds(.25f, () =>
|
||||
{
|
||||
seedlingStage2.SetActive(true);
|
||||
});
|
||||
this.CallWaitForSeconds(.33f, () =>
|
||||
{
|
||||
seedlingStage1.SetActive(false);
|
||||
seedlingStage2.SetActive(true);
|
||||
});
|
||||
break;
|
||||
case SeedlingStage.Stage3:
|
||||
seedlingStage2.GetComponent<Animator>().SetTrigger(nextStageTriggerHash);
|
||||
this.CallWaitForSeconds(.25f, () =>
|
||||
{
|
||||
seedlingStage3.SetActive(true);
|
||||
});
|
||||
this.CallWaitForSeconds(.33f, () =>
|
||||
{
|
||||
seedlingStage2.SetActive(false);
|
||||
seedlingStage3.SetActive(true);
|
||||
});
|
||||
break;
|
||||
case SeedlingStage.Stage4:
|
||||
seedlingStage3.GetComponent<Animator>().SetTrigger(nextStageTriggerHash);
|
||||
this.CallWaitForSeconds(.25f, () =>
|
||||
{
|
||||
seedlingStage4.SetActive(true);
|
||||
});
|
||||
this.CallWaitForSeconds(.33f, () =>
|
||||
{
|
||||
seedlingStage3.SetActive(false);
|
||||
seedlingStage4.SetActive(true);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in New Issue