summaryrefslogtreecommitdiff
path: root/Penguloon/Levels/Map.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Penguloon/Levels/Map.cs')
-rw-r--r--Penguloon/Levels/Map.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/Penguloon/Levels/Map.cs b/Penguloon/Levels/Map.cs
index 0e3dde6..05d1669 100644
--- a/Penguloon/Levels/Map.cs
+++ b/Penguloon/Levels/Map.cs
@@ -94,26 +94,33 @@ namespace Penguloon.Levels
if(Enemies.Count == 0 && WaveManager.DoneSpawning && WaveManager.RoundActive)
{
WaveManager.RoundActive = false;
+ Level.Money += (WaveManager.CurrentWave * 11);
}
}
- public void SpawnEnemy(Type childObject, Vector2 position, Vector2 targetPosition)
+ public void SpawnEnemy(Type childObject, Vector2 position, Vector2 targetPosition, int index)
{
- AddEnemyToList(position, targetPosition, childObject);
+ AddEnemyToList(position, targetPosition, childObject, 0);
}
public void SpawnEnemy(Type childObject)
{
- AddEnemyToList(SpawnPoint, SpawnPointTargetPos, childObject);
+ AddEnemyToList(SpawnPoint, SpawnPointTargetPos, childObject, 0);
}
- private void AddEnemyToList(Vector2 pos, Vector2 target, Type type)
+ private void AddEnemyToList(Vector2 pos, Vector2 target, Type type, int index)
{
if (type == typeof(RedBalloon))
{
var b = new RedBalloon(this);
b.Position = pos; b.TargetPosition = target;
- Enemies.Insert(0, b);
+ Enemies.Insert(index, b);
+ }
+ if (type == typeof(BlueBalloon))
+ {
+ var b = new BlueBalloon(this);
+ b.Position = pos; b.TargetPosition = target;
+ Enemies.Insert(index, b);
}
}
}