public AsteroidManager(Level level, RocketCommanderGame game) { this.level = level; this.game = game; // Create all asteroids for (int z = minSector; z <= maxSector; ++z) { for (int x = minSector; x <= maxSector; ++x) { int iz = z + middleSector; int ix = x + middleSector; this.asteroids[iz, ix] = new List<Asteroid>(); GenerateAsteroids(this.asteroids[iz, ix], x, z); } } // Create smaller asteroids for (int z = minSmallSector; z <= maxSmallSector; ++z) { for (int x = minSmallSector; x <= maxSmallSector; ++x) { int iz = z + smallMiddleSector; int ix = x + smallMiddleSector; this.smallAsteroids[iz, ix] = new List<SmallAsteroid>(); GenerateSmallAsteroids(this.smallAsteroids[iz, ix], this.asteroids[iz + smallSectorAdd, ix + smallSectorAdd].Count, x, z); } } // Precalculate visible sector stuff for (int z = minSector; z <= maxSector; ++z) { for (int x = minSector; x <= maxSector; ++x) { int iz = z + middleSector; int ix = x + middleSector; this.sectorVisibleInRange[iz, ix] = MathUtils.Sqrt(x * x + z * z) < middleSector + 0.25f; this.sectorDirection[iz, ix] = new Vector3(x, 0, z).Normalize(); } } UpdateSectors(); }
public RoamingRocketScene(RocketCommanderGame game) { this.camera = new RoamingCamera(game.mouse, game.keyboard, game); this.rocket = new Rocket(game.framework); this.game = game; }
public HelpScreen(RocketCommanderGame game, Framework framework) : base(game, framework) { }
public MainMenuScreen(RocketCommanderGame game, Framework framework) : base(game, framework) { }
public Screen(RocketCommanderGame game, Framework framework) { this.game = game; this.framework = framework; }
public MissionSelectionScreen(RocketCommanderGame game, Framework framework) : base(game, framework) { }
public void RocketCommanderGame_Run_Test() { var game = new RocketCommanderGame(1024, 768); game.Run(); }