protected void IntialiseOrbits() { for (int i = 0; i < Constants.MAX_ORBITS; i++) { var orbit = new Orbit(); Orbits.Add(orbit); } }
public void InitializeOrbits(int count) { Orbits.Clear(); for (int i = 0; i < count; i++) { Orbits.Add(new Orbit(2f * (Random.value > 0.5f ? 1f : -1f), 5 * (i + 1))); } }
public void BuildSystem(double ComLumAddFromPrim) { HZone = -2; var buildOrbit = !(Orbits.Count > 0); for (int i = 0; i < Constants.MAX_ORBITS; i++) { var orbit = new Orbit(); if (!buildOrbit) { orbit = Orbits[i]; } orbit.OrbitRange(i); orbit.SetOrbitType(Luminosity, ComLumAddFromPrim); if (orbit.OrbitalType == Orbit.OrbitType.HABITABLE) { HZone = i; } else if (orbit.OrbitalType == Orbit.OrbitType.OUTER && HZone == -2) { HZone = i - 1; } if (buildOrbit) { Orbits.Add(orbit); } } if (HZone == -2) { HZone = 10; } PlaceEmptyOrbits(); PlaceCapturedPlanets(); PlaceGasGiants(); PlacePlanetoidBelts(); foreach (var orbit in Orbits) { if (orbit.Number > NumOrbits) { if (orbit.Occupied != Orbit.OccupiedBy.CAPTURED) { orbit.OrbitalType = Orbit.OrbitType.UNAVAILABLE; } } } }
public void Stage6() { // introduce shooting - pick up a ball, force the dash, shoot the target - no orbits this time if (Orbits == Standard) { foreach (Orbit orbit in Orbits) { orbit.Remove(); } } Orbits = Empty; Orbits.Add(new Orbit(.8f, .38f, .05f)); text = "And finally:\nShoot to kill\nyour opponents"; point = new PointF(W / 2, W / 4); Head player = HEADS[key_player]; player.act = Activities.DEFAULT; player.pos = new IPoint(W * .7d, W * .19d); player.v = speed * IVector.Left; bot.act = Activities.DEFAULT; bot.pos = new IPoint(W * 1 / 4, W / 4); bot.v = IVector.Up; bot.INVINCIBLE = true; lock (Orb.OrbLock) for (int i = 1; i < 12; i++) { new Orb(true).pos = new IPoint(W * 1 / 4, W / 2 * i / 13); } bot1.INACTIVE = false; bot1.color = Color.Green; bot1.DisplayKey = "×"; bot1.pos = new IPoint(.8d * W, .215d * W); bot1.act = Activities.ORBITING; bot1.orbitCenter = new IPoint(W * .8f, W * .19f); new Orb(true).pos = new IPoint(W * .1f, W * .19f); }