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