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

45 lines
1.2 KiB
C#
Raw Normal View History

using SHADE;
2023-03-25 02:38:56 +08:00
using SHADE_Scripting.Audio;
using System;
public class PlayerLandState : BaseState
{
public PlayerLandState(StateMachine stateMachine) : base(stateMachine)
{
stateName = "Land State";
}
public override void OnEnter()
{
2023-03-14 17:18:52 +08:00
//Debug.Log("landed ENTER");
if (PlayerAnimations.Instance)
{
if (!machine.GetScript<PlayerController>().holdItem)
{
PlayerAnimations.Instance.playerAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpEndClip);
PlayerAnimations.Instance.BagAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpEndClip);
PlayerAnimations.Instance.silhoPlayerAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpEndClip);
PlayerAnimations.Instance.silhoBagAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpEndClip);
}
else
machine.GetScript<PlayerController>().playLandedAnimation = false;
}
}
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");
}
}