예제 #1
0
        private void AnnounceResults()
        {
            switch (Outcome)
            {
            case Definitions.RaceOutcome.OwnPlayerWin:
                _avatar.AnimationEngine.Sequence = AnimationDataManager.Sequences["player-front-win"];
                SoundEffectManager.PlayEffect("race-winner");
                _glowBurst.Visible = true;
                if (LivesAwarded)
                {
                    _displayLivesAward = true;
                }
                break;

            case Definitions.RaceOutcome.OpponentPlayerWin:
                _avatar.AnimationEngine.Sequence = AnimationDataManager.Sequences["player-front-lose"];
                SoundEffectManager.PlayEffect("race-loser");
                break;

            case Definitions.RaceOutcome.Incomplete:
                _avatar.AnimationEngine.Sequence = AnimationDataManager.Sequences["player-front-lose"];
                SoundEffectManager.PlayEffect("race-loser");
                break;
            }

            _outcomePopup.Activate();
        }
예제 #2
0
        private void AnnounceResults()
        {
            if (Active)
            {
                switch (Outcome)
                {
                case Definitions.RaceOutcome.PlayerOneWin:
                    _playerOne.AnimationEngine.Sequence = AnimationDataManager.Sequences["player-front-win"];
                    _playerTwo.AnimationEngine.Sequence = AnimationDataManager.Sequences["player-front-lose"];
                    _glowBurst.Position = _playerOne.WorldPosition;
                    _glowBurst.Visible  = true;
                    SoundEffectManager.PlayEffect("race-winner");
                    break;

                case Definitions.RaceOutcome.PlayerTwoWin:
                    _playerTwo.AnimationEngine.Sequence = AnimationDataManager.Sequences["player-front-win"];
                    _playerOne.AnimationEngine.Sequence = AnimationDataManager.Sequences["player-front-lose"];
                    _glowBurst.Position = _playerTwo.WorldPosition;
                    _glowBurst.Visible  = true;
                    SoundEffectManager.PlayEffect("race-winner");
                    break;

                case Definitions.RaceOutcome.Incomplete:
                    _playerOne.AnimationEngine.Sequence = AnimationDataManager.Sequences["player-front-lose"];
                    _playerTwo.AnimationEngine.Sequence = AnimationDataManager.Sequences["player-front-lose"];
                    SoundEffectManager.PlayEffect("race-loser");
                    break;
                }

                _outcomePopup.Activate();
            }
        }