public void Draw(Drawvisitor drawvisitor)
 {
     if (gamemanager.SelectedTile != gamemanager.EmptyTile)
     {
         drawvisitor.DrawTileSelectionButtons(this);
     }
 }
Exemple #2
0
        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);
        }
Exemple #3
0
 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;
     }
 }
Exemple #4
0
 public void Draw(Drawvisitor drawvisitor, ReturnInput input)
 {
     drawvisitor.DrawGameScreen(this, input);
 }