private static void AssertObjectListHasLevelSize(int width, int height, int expected) { var level = new Level(new Size(width, height)); var handler = new LevelObjectHandler(level); Assert.AreEqual(expected, handler.ObjectList.Length); }
public void Setup(LevelContainer.CaveType[] caveList, bool bEndless, LevelObjectHandler objHandler) { _levelCaveList = caveList; _objectHandler = objHandler; _bEndlessMode = bEndless; _caveZ = Toolbox.Instance.ZLayers["Cave"]; _tileSizeX = Toolbox.TileSizeX; if (_bEndlessMode) { _endlessCave = new CaveRandomiser(); // TODO generate random cave } else { _numCavePieces = _levelCaveList.Length; GeneratePresetLevelCave(); SetStartingObstacles(); } _cavePieceCounter = 0; }
private void CreateGameObjects() { _levelObjects = _levelScripts.AddComponent <LevelObjectHandler>(); }
public void SetUp() { objectHandler = new LevelObjectHandler(16); }