public override void DeleteNestedObjects() { WorldLogic.DeleteNestedObjects(); WorldLogic = null; Grid.DeleteNestedObjects(); Grid = null; }
public GameWorld() { var gridSize = new Vector2i(AmountOfDonuts); Grid = new WorldGrid(gridSize, Donut.Size); WorldLogic = new WorldLogic(this, (WorldGrid)Grid); }
public World() { Vector2i passerbyPositionInIndices = new Vector2i( MathF.RandomInt(StepsCount + 1, 320 - (StepsCount + 1)), MathF.RandomInt(StepsCount + 1, 320 - (StepsCount + 1)) ); var gridSize = new Vector2i( passerbyPositionInIndices.X + StepsCount + 1, passerbyPositionInIndices.Y + StepsCount + 1 ); Grid = new RectangularSpriteGrid(gridSize, CellSize, ResourceLoader.CellSprite); WorldLogic = new WorldLogic(this, Grid, passerbyPositionInIndices); }
public World(PlayInterface playInterface) { Grid = new WorldGrid(ResourceLoader.GridSize, CellSize); WorldLogic = new WorldLogic(this, Grid, ResourceLoader.StartPositionIndices, ResourceLoader.FinishPositionIndices, playInterface); }