private void NewFloor(bool atExit = true) { if (floorNum < 0) { gameState = GameState.WorldMap; return; } if (!player.hasMoved) { floor = floors.GetFloor(floorNum); if (atExit) { player.NewFloor(); } else { foreach (KeyValuePair <Vector2, Block> block in floor) { if (block.Value.Type() == BlockType.Up) { player.NewFloor(block.Key.X, block.Key.Y); break; } } } player.hasMoved = true; } }
//Setup for a floor private void FloorSetup(int seed, int height, Vector2 pos) { floors = new Floors(seed, height, pos); floorNum = 0; //Player always starts on the first floor floor = floors.GetFloor(floorNum); player.NewFloor(); }