public void Draw(Drawvisitor drawvisitor) { if (gamemanager.SelectedTile != gamemanager.EmptyTile) { drawvisitor.DrawTileSelectionButtons(this); } }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); emptyTexture = Content.Load <Texture2D>("white_pixel"); Black_transparent_Texture = Content.Load <Texture2D>("Black_transparant"); White_transparent_Texture = Content.Load <Texture2D>("White_transparant"); arial = Content.Load <SpriteFont>("Arial"); this.drawvisitor = new Drawvisitor(spriteBatch, this.currentplatform, width, height, emptyTexture, Black_transparent_Texture, White_transparent_Texture, arial); if (currentplatform == Platform.windows) { this.inputhandler = new WindowsInputHandler(); } else { this.inputhandler = new AndroidInputHandler(); } this.game_manager = new Game_Manager(currentplatform, drawvisitor, inputhandler); }
public Game_Manager(Platform current_platform, Drawvisitor drawvisitor, iInputhandler inputhandler) { this.EmptyTile = new Tile(this, new Position(-1, -1), false); this.drawvisitor = drawvisitor; this.level = new leveldata(this, Dificulty.normal); this.inputhandler = inputhandler; latestinput = inputhandler.getinput(); this.SelectedTile = EmptyTile; this.selectionbuttons = new SelectionButtons(this); this.current_platform = current_platform; if (this.current_platform == Platform.windows) { SelectionButtonsEnabled = false; } else { SelectionButtonsEnabled = true; } }
public void Draw(Drawvisitor drawvisitor, ReturnInput input) { drawvisitor.DrawGameScreen(this, input); }