public static Level GenerateBigRoomTest(Game game) { Level newLvl = new Level(game); var _room = new BigRoom(game, new Vector2(0, 0) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) ,new Vector2(2,3) ); _room.DoorPositions.PositionsArray[0, 0] = new DoorPosition(); _room.DoorPositions.PositionsArray[0, 0].left = 20; _room.DoorPositions.PositionsArray[0, 1] = new DoorPosition(); _room.DoorPositions.PositionsArray[0, 1].left = 20; _room.DoorPositions.PositionsArray[1, 0] = new DoorPosition(); _room.DoorPositions.PositionsArray[1, 0].top = 12; _room.DoorPositions.PositionsArray[0, 2] = new DoorPosition(); _room.DoorPositions.PositionsArray[1, 2] = new DoorPosition(); _room.DoorPositions.PositionsArray[1, 2].bottom = 5; _room.DoorPositions.PositionsArray[1, 2].right = 20; newLvl.Roomlist.Add(_room); newLvl.StartRoom = _room; var _sroom = new SmallRoom(game, new Vector2(-1, 0) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) ); _sroom.DoorPositions.PositionsArray[0, 0] = new DoorPosition(); _sroom.DoorPositions.PositionsArray[0, 0].right = 1; _sroom.DoorPositions.PositionsArray[0, 0].bottom = 28; _sroom.DoorPositions.PositionsArray[0, 0].top = 1; _sroom.DoorPositions.PositionsArray[0, 0].left = 20; newLvl.Roomlist.Add(_sroom); var _sroom1 = new SmallRoom(game, new Vector2(-1, 1) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) ); _sroom1.DoorPositions.PositionsArray[0, 0] = new DoorPosition(); _sroom1.DoorPositions.PositionsArray[0, 0].right = 12; _sroom1.DoorPositions.PositionsArray[0, 0].bottom = 28; _sroom1.DoorPositions.PositionsArray[0, 0].top = 28; _sroom1.DoorPositions.PositionsArray[0, 0].left = 20; newLvl.Roomlist.Add(_sroom1); return newLvl; }
public void SetPreviousRoom(SmallRoom value) { previousRoom.Add(value.GetLocation()); }
public static Level GenerateLvl02(Game game) { Level newLvl = new Level(game); var _room = new SmallRoom(game, new Vector2(0, 0) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) ); _room.DoorPositions.PositionsArray[0,0] = new DoorPosition(); _room.DoorPositions.PositionsArray[0, 0].right = 1; _room.DoorPositions.PositionsArray[0, 0].bottom = 28; _room.DoorPositions.PositionsArray[0, 0].top = 1; _room.DoorPositions.PositionsArray[0, 0].left = 20; newLvl.Roomlist.Add(_room); var _room0 = new SmallRoom(game, new Vector2(-1, 0) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) ); _room0.DoorPositions.PositionsArray[0, 0] = new DoorPosition(); _room0.DoorPositions.PositionsArray[0, 0].right = 20; newLvl.Roomlist.Add(_room0); var _room1 = new SmallRoom(game, new Vector2(0, 1) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) ); _room1.DoorPositions.PositionsArray[0, 0] = new DoorPosition(); _room1.DoorPositions.PositionsArray[0, 0].right = 8; _room1.DoorPositions.PositionsArray[0, 0].bottom = 12; _room1.DoorPositions.PositionsArray[0, 0].top = 28; _room1.DoorPositions.PositionsArray[0, 0].left = 12; newLvl.Roomlist.Add(_room1); var _room2 = new SmallRoom(game, new Vector2(-1, 1) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) ); _room2.DoorPositions.PositionsArray[0, 0] = new DoorPosition(); _room2.DoorPositions.PositionsArray[0, 0].right = 12; newLvl.Roomlist.Add(_room2); return newLvl; }
public static Level GenerateSmallRoomGrid(Game game) { Level newLvl = new Level(game); Room[,] _roomgrid = new Room[10,10]; for (int x = 0; x < 10; x++) { for (int y = 0; y < 10; y++) { var _room = new SmallRoom(game, new Vector2(x, y) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) , new Color(MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255), MyRandom.Random.Next(0, 255)) ); _room.DoorPositions.PositionsArray[0, 0] = new DoorPosition(); _room.DoorPositions.PositionsArray[0, 0].right = 10; _room.DoorPositions.PositionsArray[0, 0].bottom = 14; _room.DoorPositions.PositionsArray[0, 0].top = 14; _room.DoorPositions.PositionsArray[0, 0].left = 10; newLvl.Roomlist.Add(_room); } } return newLvl; }
public void SetPreviousRoom(SmallRoom value) { previousRoom = value; }