protected override void DefineStaticObjects() { Lights ll = new Lights(); ll.TurnOff(); this.PlaceObjectTo(new int2(5, 5), ll); LightsControl lc = new LightsControl(); lc.myObjects.Add(ll); lc.TurnOff(); this.PlaceObjectTo(new int2(1, 1), lc); Lights lll = new Lights(); lll.TurnOn(); this.PlaceObjectTo(new int2(2, 5), lll); LightsControl lcc = new LightsControl(); lcc.myObjects.Add(lll); lcc.TurnOn(); this.PlaceObjectTo(new int2(4, 7), lcc); MyDoor door = new MyDoor(); door.TurnOff(); this.PlaceObjectTo(new int2(5, 1), door); DoorControl dc = new DoorControl(); dc.myObjects.Add(door); dc.TurnOff(); this.PlaceObjectTo(new int2(7, 7), dc); MyDoor door2 = new MyDoor(); door2.TurnOn(); this.PlaceObjectTo(new int2(7, 4), door2); DoorControl dc2 = new DoorControl(); dc2.myObjects.Add(door); dc2.TurnOn(); this.PlaceObjectTo(new int2(2, 8), dc2); StaticObjects = new MyStaticObject[] { ll, lc, lll, lcc, door2, dc2, door, dc }; }
protected override void DefineStaticObjects() { // place into the map MyDoor door = new MyDoor(); door.TurnOn(); this.PlaceObjectTo(new int2(2, 3), door); DoorControl dc = new DoorControl(); dc.myObjects.Add(door); dc.TurnOn(); this.PlaceObjectTo(new int2(11, 7), dc); MyDoor door2 = new MyDoor(); door2.TurnOn(); this.PlaceObjectTo(new int2(7, 7), door2); DoorControl dc2 = new DoorControl(); dc2.myObjects.Add(door2); dc2.TurnOn(); this.PlaceObjectTo(new int2(12, 3), dc2); Lights l = new Lights(); l.TurnOff(); this.PlaceObjectTo(new int2(3, 7), l); LightsControl lc = new LightsControl(); lc.myObjects.Add(l); lc.TurnOff(); this.PlaceObjectTo(new int2(0, 0), lc); StaticObjects = new MyStaticObject[] { dc, door, door2, dc2, l, lc }; }