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

47 lines
1.1 KiB
C#
Raw Normal View History

using SHADE;
using System;
public class PlayerIdleState : BaseState
{
2023-03-10 16:26:52 +08:00
private bool holdItem;
public PlayerIdleState(StateMachine stateMachine, bool hi) : base(stateMachine)
{
stateName = "Idle State";
2023-03-10 16:26:52 +08:00
holdItem = hi;
}
public override void OnEnter()
{
//Debug.Log("WALK ENTER");
2023-03-10 16:26:52 +08:00
if (PlayerAnimations.Instance)
{
if (!holdItem)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
}
else
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
}
}
}
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");
}
}