Advertisement
LeeMace

Idle State

May 2nd, 2024
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | Gaming | 0 0
  1. public class CharacterIdleState : BaseCharacterState
  2. {
  3.     public CharacterIdleState(CharacterBehaviour stateMachine) : base(stateMachine) {
  4.     }
  5.  
  6.     public override void UpdateState() {
  7.         base.UpdateState();
  8.         Debug.Log("CharacterIdleState hello from IdleState");
  9.         if (characterBehaviour.moveInput != Vector2.zero) {
  10.             ExitState(new CharacterMoveState(characterBehaviour));
  11.         }
  12.     }
  13. }
Tags: Idle State
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement