Example #1
0
 static void Main(string[] args)
 {
     using (MainGame game = new MainGame())
     {
         game.Run();
     }
 }
        public TileSelector(MainGame game, Vector2 startPos)
        {
            gameRef = game;
            levelRef = game.level;
            selectedIndex = gameRef.SelectedTileIndex;
            this.startPos = startPos;

            if (gameRef.level.CurrentTileSet != null)
                loadedTileSet = gameRef.level.CurrentTileSet.Image;

            plainWhite = new DrawableRectangle(gameRef.GraphicsDevice, Vector2.One, Color.White, true).Texture;
        }
Example #3
0
 public Canvas(Game game)
 {
     gameRef = (MainGame)game;
     bounds = new Rectangle((int)startPos.X, (int)startPos.Y, CANVAS_WIDTH, CANVAS_HEIGHT);
 }
Example #4
0
 public HUD(MainGame gameRef)
 {
     this.gameRef = gameRef;
     startPos = Vector2.Zero;
 }