diff options
Diffstat (limited to 'Penguloon/Levels/Map.cs')
| -rw-r--r-- | Penguloon/Levels/Map.cs | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/Penguloon/Levels/Map.cs b/Penguloon/Levels/Map.cs index 5248a25..2e90874 100644 --- a/Penguloon/Levels/Map.cs +++ b/Penguloon/Levels/Map.cs @@ -10,7 +10,7 @@ namespace Penguloon.Levels { public class Map { - // 18 x 12 + // 18 x 13 public Tile[,] TileMap { get; set; } public int MapWidth { get; private set; } @@ -41,9 +41,19 @@ namespace Penguloon.Levels MapHeight = (int)(StaticUIValues.ScreenViewport.Y); TileWidth = MapWidth / 18; - TileHeight = MapHeight / 13; + + if (TileWidth * 13 > MapHeight) + { + TileHeight = MapHeight / 13; + TileWidth = TileHeight; + } + else + { + TileHeight = TileWidth; + } MapWidth = TileWidth * 18; + MapHeight = TileHeight * 13; WaveManager = new WaveManager(this); } @@ -94,7 +104,7 @@ namespace Penguloon.Levels if(Enemies.Count == 0 && WaveManager.DoneSpawning && WaveManager.RoundActive) { WaveManager.RoundActive = false; - Level.Money += (WaveManager.CurrentWave * 11); + Level.Money += (WaveManager.CurrentWave * 30); } } @@ -159,6 +169,25 @@ namespace Penguloon.Levels Enemies.Insert(index, b); } } + + public void SpawnObject(Type type, Vector2 pos) + { + if (type == typeof(PenguinObject)) + { + var b = new PenguinObject(pos, this); + Objects.Add(b); + } + if (type == typeof(GoldPenguinObject)) + { + var b = new GoldPenguinObject(pos, this); + Objects.Add(b); + } + if (type == typeof(CannonObject)) + { + var b = new CannonObject(pos, this); + Objects.Add(b); + } + } } public class Tile |
