public void spawnEnemy(EnemyBase enemyBase, Vector2 position) { if (antWorld == null) throw new NullReferenceException("[antWorld] has not been initialized, yet."); enemyBase.origin = position; enemyBase.rotation = Randomizer.NextInt(0, 359); EntityManager.Singleton.entityList.Add(enemyBase); }
public void spawnEnemy(EnemyBase enemyBase) { if (antWorld == null) throw new NullReferenceException("[antWorld] has not been initialized, yet."); int max_x = (int)antWorld.size.X; int max_y = (int)antWorld.size.Y; int random_x = Randomizer.NextInt(0, max_x); int random_y = Randomizer.NextInt(0, max_y); enemyBase.origin = new Vector2(random_x, random_y); enemyBase.rotation = Randomizer.NextInt(0, 359); EntityManager.Singleton.entityList.Add(enemyBase); }