Example #1
0
 public Enemy(int X, int Y, Tile.tileType Type, int Damage, int hitPoints) : base(X, Y, Type)
 {
     this.type = Tile.tileType.Enemy;
     setDamage(Damage);
     setHit_Points(hitPoints);
     setMaxHit_Points(hitPoints);
 }
        private Tile create(Tile.tileType type)
        {
            int[] initLocation = getSpawnPosition();

            if (type == Tile.tileType.Hero)
            {
                return(new Hero(initLocation[1], initLocation[0], 10));
            }
            else if (type == Tile.tileType.Enemy)
            {
                return(enemyGen(initLocation[1], initLocation[0]));
            }
            else if (type == Tile.tileType.Gold)
            {
                return(new Gold(initLocation[1], initLocation[0]));
            }
            else
            {
                return(new EmptyTile(initLocation[1], initLocation[0]));
            }
        }