Game Development Reference
In-Depth Information
EnemyType ¼ enemyType;
LaunchTime ¼ launchTime;
}
}
Run the code again, and you will see a stream of enemies arcing through the top
half of the screen, as shown in Figure 10.17.
At this point, it might be nice to add a few more enemy types to spice up the
level.
private Enemy CreateEnemyFromDef(EnemyDef definition)
{
Enemy enemy ¼ new Enemy(_textureManager, _effectsManager);
if (definition.EnemyType == "cannon_fodder")
{
List < Vector > _pathPoints ¼ new List < Vector > ();
_pathPoints.Add(new Vector(1400, 0, 0));
_pathPoints.Add(new Vector(0, 250, 0));
_pathPoints.Add(new Vector(-1400, 0, 0));
Figure 10.17
More interesting levels.
Search WWH ::




Custom Search