protected override void CreateLevel() { MusicPlay("sounds/level1Loop"); levelSize = new Vector2(80, 60); //set the level size CreateObject("SpaceDustPF", gameBounds.center, 0); for (int i = 0; i < 6; i++) { Asteroid current = (Asteroid)CreateObject("AsteroidPF", GetRandomPosition(), GetRandomAngle()); current.velocity = GetRandomVelocity(current.maxSpeed); } for (int i = 0; i < 2; i++) { RubberyDebris current = (RubberyDebris)CreateObject("RubberyDebrisPF", GetRandomPosition(), GetRandomAngle()); current.velocity = GetRandomVelocity(current.maxSpeed); } LazerSword sword = (LazerSword)CreateObject("LazerSwordPF"); MultiShots multiShot = (MultiShots)CreateObject("MultiShotPF"); Heal heal = (Heal)CreateObject("HealPF"); }
protected override void CreateLevel() { MusicPlay("sounds/level1Loop"); levelSize = new Vector2(80, 60); //set the level size CreateObject("SpaceDustPF", gameBounds.center, 0); for (int i = 0; i < 4; i++) { Asteroid current = (Asteroid)CreateObject("AsteroidPF", GetRandomPosition(), GetRandomAngle()); current.velocity = GetRandomVelocity(current.maxSpeed); } for (int i = 0; i < 2; i++) { HomingMine current = (HomingMine)CreateObject("HomingMinePF", GetRandomPosition(), GetRandomAngle()); } for (int i = 0; i < 2; i++) { RandomTurner current = (RandomTurner)CreateObject("RandomTurnerPF", GetRandomPosition(), GetRandomAngle()); current.velocity = GetRandomVelocity(current.maxSpeed); } for (int i = 0; i < 2; i++) { MineLayer current = (MineLayer)CreateObject("MineLayerPF", GetRandomPosition(), GetRandomAngle()); current.velocity = GetRandomVelocity(current.maxSpeed); } for (int i = 0; i < 2; i++) { RubberyDebris current = (RubberyDebris)CreateObject("RubberyDebrisPF", GetRandomPosition(), GetRandomAngle()); current.velocity = GetRandomVelocity(current.maxSpeed); } for (int i = 0; i < 2; i++) { SputteringDebris current = (SputteringDebris)CreateObject("SputteringDebrisPF", GetRandomPosition(), GetRandomAngle()); current.velocity = GetRandomVelocity(current.maxSpeed); } for (int i = 0; i < 1; i++) { IndestructableDebris current = (IndestructableDebris)CreateObject("IndestructableDebrisPF", GetRandomPosition(), GetRandomAngle()); current.velocity = GetRandomVelocity(current.maxSpeed); } GravityWellController well = (GravityWellController)CreateObject("GravityWellControllerPF"); }