public void WriteTrace() { var smallShips = SectorObjects.OfType <MyMwcObjectBuilder_SmallShip>(); MyTrace.Indent(TraceWindow.Saving, "SmallShips"); foreach (var smallShip in smallShips) { MyTrace.Send(TraceWindow.Saving, smallShip.DisplayName); } MyTrace.UnIndent(TraceWindow.Saving); }
void Fill(SectorObjects type) { float x, z; System.Random random = new System.Random(); do { x = random.Next(-(width / 2), (width / 2)); z = random.Next(-(height / 2), (height / 2)); }while (SectorObject.Occupied(map, x, z) == true); map.Add(new SectorObject(type, x, z)); }
public SectorObject(SectorObjects type, float x, float z) { this.type = type; this.x = x; this.z = z; }