Example #1
0
 public GameStageUI()
 {
     snakeAllSounds.BackgroundSound = gameSound;
     snakeAllSounds.SnakeSound      = snakeSound;
     game            = new GameService(snakeAllSounds);
     highScores      = new HighScoresService();
     meniu           = new Meniu(highScores);
     meniuTexture    = new MeniuTexture();
     stageTexture    = new GameStageTexture();
     snakeTexture[0] = new SnakeTexture();
     snakeTexture[1] = new SnakeTexture();
     snakeTexture[2] = new SnakeTexture();
     foodTexture     = new FoodTexture();
     infoWindTexture = new InfoTexture();
     radarTexture    = new RadarTexture();
     barrierTexture  = new BarrierTexture();
     graphics        = new GraphicsDeviceManager(this);
     stageDraw       = new StageDrawingService(stageTexture);
     snakeDraw       = new SnakeDrawingService(0, snakeTexture);
     foodDraw        = new FoodDrawingService(foodTexture);
     infoDraw        = new InfoDrawService(infoWindTexture);
     radarDraw       = new RadarDrawingService(radarTexture);
     barrierDraw     = new BarrierDrawingService(barrierTexture);
     meniuSound      = new MeniuSound();
     direction.X     = -1;
     direction.Y     = 1;
     up       = true;
     down     = true;
     keyboard = new KeyboardInput();
 }
Example #2
0
 public void SetSound(MeniuSound sound)
 {
     this.sound = sound;
 }