예제 #1
0
        //TODO Get rid of event driven design
        protected void GameManager_MeteorWasHit(object sender, MeteorHitEventArgs e)
        {
            _gameScoreKeeper.UpdateScore(e.Meteor.Score);
            _scorePointsDisplay.Display(e.Meteor.Location, e.Meteor.Score);

            if (!(e.Meteor.GetNextSmallerMeteor() is NullMeteorType))
            {
                _meteors.Add(new Meteor(e.Meteor.GetNextSmallerMeteor(), e.Meteor.Location));
                _meteors.Add(new Meteor(e.Meteor.GetNextSmallerMeteor(), e.Meteor.Location));
            }
        }
예제 #2
0
        //TODO Get rid of event driven design
        protected void GameManager_MeteorWasHit(object sender, MeteorHitEventArgs e)
        {
            _gameScoreKeeper.UpdateScore(e.Meteor.Score);
            _scorePointsDisplay.Display(e.Meteor.Location, e.Meteor.Score);

            if (!(e.Meteor.GetNextSmallerMeteor() is NullMeteorType))
            {
                _meteors.Add(new Meteor(e.Meteor.GetNextSmallerMeteor(), e.Meteor.Location));
                _meteors.Add(new Meteor(e.Meteor.GetNextSmallerMeteor(), e.Meteor.Location));
            }
        }