SHADE_Y3/Assets/Scripts/Gameplay/Player/PlayerStates/UT_PlayerIdleState.cs

37 lines
749 B
C#
Raw Normal View History

using SHADE;
using System;
public class PlayerIdleState : BaseState
{
2023-03-10 00:16:38 +08:00
private AnimationClipAsset idleClip;
private Animator animator;
public PlayerIdleState(StateMachine stateMachine, Animator ani , AnimationClipAsset clip) : base(stateMachine)
{
stateName = "Idle State";
2023-03-10 00:16:38 +08:00
idleClip = clip;
animator = ani;
}
public override void OnEnter()
{
//Debug.Log("WALK ENTER");
2023-03-10 00:16:38 +08:00
animator.Play(idleClip);
}
public override void update()
{
//Debug.Log("WALKING");
}
public override void fixedUpdate()
{
//Debug.Log("FIXED WALKING");
}
public override void OnExit()
{
//Debug.Log("WALK EXIT");
}
public override void onTriggerEnter(CollisionInfo info)
{
//Debug.Log("TRIGGER");
}
}