Beispiel #1
0
 private void GameLevelOnChangeLevelEvent(object sender, LevelEventArgs eventArgs)
 {
     if (eventArgs.GameLevel == null)
     {
         BackLevel();
     }
     else
     {
         NextLevel(eventArgs.GameLevel);
     }
 }
Beispiel #2
0
        public void BackLevel()
        {
            if (ChangeLevelEvent == null)
            {
                return;
            }

            var eventArgs = new LevelEventArgs()
            {
                GameLevel = null
            };

            ChangeLevelEvent.Invoke(this, eventArgs);
        }
Beispiel #3
0
        public void NextLevel(GameLevel gameLevel)
        {
            if (ChangeLevelEvent == null)
            {
                return;
            }

            var eventArgs = new LevelEventArgs()
            {
                GameLevel = gameLevel
            };

            ChangeLevelEvent.Invoke(this, eventArgs);
        }