Beispiel #1
0
    // ======================================================================================
    protected override void UpdatePhase()
    {
        base.UpdatePhase();

        if (m_state != m_stateMachine.State)
        {
            m_state = m_stateMachine.State;

            switch (m_state)
            {
            case PlayerStateMachine.eStates.Attack:
                switch (m_stateMachine.HandWeapon)
                {
                case PlayerAttack.eWeapon.Fists:
                    SoundMgr.PlaySoundEvent(SoundMgr.eSoundEventType.FistAttk);
                    break;

                case PlayerAttack.eWeapon.Saber:
                    SoundMgr.PlaySoundEvent(SoundMgr.eSoundEventType.SaberAttk);
                    break;

                case PlayerAttack.eWeapon.Pistol:
                    SoundMgr.PlaySoundEvent(SoundMgr.eSoundEventType.PistolAttk);
                    break;
                }
                break;

            case PlayerStateMachine.eStates.Dashing:
                SoundMgr.PlaySoundEvent(SoundMgr.eSoundEventType.Dash);
                break;

            case PlayerStateMachine.eStates.Dead:
                SoundMgr.PlaySoundEvent(SoundMgr.eSoundEventType.Death);
                break;
            }
        }
    }