protected override void OnAwake() { grid = new ObjectPlacementGrid(width, height, cellSize); if (debugMode) { grid = new GridXZDebug <GridObject>(grid); } CurrentBuilding = buildings[0]; currentDirection = GridObjectDirection.DOWN; }
private void Update() { if (Input.GetMouseButtonDown(0)) { CreateBuilding(); } if (Input.GetKeyDown(KeyCode.R)) { currentDirection = currentDirection.Next(); } HotkeysInput(); }
public GridObject(int width, int height, GridObjectDirection direction) { this.width = width; this.height = height; this.direction = direction; }