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

45 lines
1.2 KiB
C#

using SHADE;
using SHADE_Scripting.Audio;
using System;
public class PlayerLandState : BaseState
{
public PlayerLandState(StateMachine stateMachine) : base(stateMachine)
{
stateName = "Land State";
}
public override void OnEnter()
{
//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");
}
}