Beispiel #1
0
 public Game(Level level, Snake snake, Player player)
 {
     this.level           = level;
     this.snake           = snake;
     this.player          = player;
     this.speedController = SpeedController.GetInstance();
 }
Beispiel #2
0
        public static SpeedController GetInstance()
        {
            if (instance == null)
            {
                instance = new SpeedController();
            }

            return(instance);
        }
Beispiel #3
0
 private void InitializeGameSpeed()
 {
     this.gameSpeed    = SpeedController.GetInstance();
     gameSpeed.OnTick += gameTimer_OnTick;
 }