2022-11-20 16:27:39 +08:00
|
|
|
|
using SHADE;
|
2023-03-25 02:38:56 +08:00
|
|
|
|
using SHADE_Scripting.Audio;
|
2022-11-20 16:27:39 +08:00
|
|
|
|
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;
|
|
|
|
|
}
|
2022-11-20 16:27:39 +08:00
|
|
|
|
}
|
|
|
|
|
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");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|