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);
        }
예제 #2
0
        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));
        }
예제 #3
0
 public SectorObject(SectorObjects type, float x, float z)
 {
     this.type = type;
     this.x    = x;
     this.z    = z;
 }