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(); }
public Meniu(IHighScores highScores) { highScoresData = highScores; MenuItems = 4; meniuState = MeniuState.Main; highScore = HighScoresType.Cl0; Arcade = ArcadeLevel.Null; Title = "Meniu"; Iterator = 0; InfoText = string.Empty; helpPage = 1; }
public CoreEngine(IUIEngine uiEngine, IField field, IPlayer player, IActionProvider actionProvider = null, IMovement movement = null, ISolvedChecker solvedChecker = null) { this._uiEngine = uiEngine; this._inputProvider = uiEngine.InputProvider; this._field = field; this._player = player; this._highScores = HighScores.Instance; this.ActionProvider = actionProvider ?? new DefaultActionProvider(this); this.Movement = movement ?? new BackwardMovement(field); this.SolvedChecker = solvedChecker ?? new DefaultSolvedChecker(); this.AttachUIToEvents(); }