private void Awake() { instance = this; fsm = new PlayerFSM(); fsm.Initialize(this); fsm.AddState(PlayerStateType.Normal, new NormalState()); fsm.AddState(PlayerStateType.Dash, new DashState()); controller = GetComponent <CharacterController>(); animator = GetComponent <Animator>(); }