Ejemplo n.º 1
0
        /// <summary>
        /// Instantiates an enemy and puts him in the level.
        /// </summary>
        private LevelTile LoadBossTile(int x, int y, string spriteSet, int health, int attack)
        {
            Vector2 position = RectangleExtensions.GetBottomCenter(GetBounds(x, y));

            Level.Boss = new Boss(position, spriteSet, health, attack);

            return(new LevelTile(null, TileCollision.Passable));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Instantiates an enemy and puts him in the level.
        /// </summary>
        private LevelTile LoadEnemyTile(int x, int y, string spriteSet, int health, int attack, int exp)
        {
            Vector2 position = RectangleExtensions.GetBottomCenter(GetBounds(x, y));
            Enemy   e        = new Enemy(position, spriteSet, health, attack, exp);

            Level.enemies.Add(e);

            return(new LevelTile(null, TileCollision.Passable));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Instantiates a player, puts him in the level, and remembers where to put him when he is resurrected.
        /// </summary>
        private LevelTile LoadStartTile(int x, int y)
        {
            start = RectangleExtensions.GetBottomCenter(GetBounds(x, y));

            if (Statics.Gameover)
            {
                Statics.Gameover = false;
            }
            else
            {
                Statics.LevelPlayer.Reset(start);
            }

            return(new LevelTile(null, TileCollision.Passable));
        }