Exemplo n.º 1
0
 /// <summary>
 /// Der Haupteinstiegspunkt für die Anwendung.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemplo n.º 2
0
        public Entity(Game1 game, int x, int y)
        {
            Game = game;
            X = x;
            Y = y;

            BoundingOffsetX = 0;
            BoundingOffsetY = 0;
            IsCollidable = true;
            DrawBoundingBox = false;
        }
Exemplo n.º 3
0
        public Adventurer(Game1 game, int x, int y)
            : base(game, x, y)
        {
            IsAnimated = true;
            //DrawBoundingBox = true;

            Width = 33;
            Height = 58;

            BoundingOffsetX = 30;
            BoundingOffsetY = 35;

            AddAnimation(new Animation("idle", game.Content.Load<Texture2D>("player_idle"), 96));

            AddAnimation(new Animation("run", game.Content.Load<Texture2D>("player_run"), 96));

            CurrentAnimation = "idle";
        }
Exemplo n.º 4
0
        public TileMap(Game1 game, int mapWidth, int mapHeight, int tileWidth, int tileHeight, TileSet tileSet)
        {
            Width = mapWidth;
            Height = mapHeight;

            TileWidth = tileWidth;
            TileHeight = tileHeight;

            TileCountX = mapWidth / tileWidth;
            TileCountY = mapHeight / tileHeight;

            tiles = new Tile[TileCountX, TileCountY];
            TileSet = tileSet;

            Game = game;

            ResetTiles("empty");
        }