protected override void Beat() { if (LockBeat) { return; } if (m_CurrentStateBuffer != m_CurrentState) { PawnState.SetData((int)m_CurrentState, m_Animator); m_CurrentStateBuffer = m_CurrentState; } switch (m_CurrentState) { case ERhythmoPawnState.Idle: break; case ERhythmoPawnState.MoveRight: MoveRight(m_MoveValue); break; case ERhythmoPawnState.MoveLeft: MoveRight(-m_MoveValue); break; case ERhythmoPawnState.FaceUp: //FaceUp(m_MoveValue); break; case ERhythmoPawnState.FaceDown: //FaceUp(-m_MoveValue); break; } if (m_AlwaysEnableTickSound) { RythmoPlay1(); } }
// Call this with Input builder to define direction. public void SetPawnState(int _state) { m_CurrentState = (ERhythmoPawnState)_state; }