Esempio n. 1
0
        protected override void OnAwake()
        {
            grid = new ObjectPlacementGrid(width, height, cellSize);

            if (debugMode)
            {
                grid = new GridXZDebug <GridObject>(grid);
            }

            CurrentBuilding  = buildings[0];
            currentDirection = GridObjectDirection.DOWN;
        }
Esempio n. 2
0
        private void Update()
        {
            if (Input.GetMouseButtonDown(0))
            {
                CreateBuilding();
            }

            if (Input.GetKeyDown(KeyCode.R))
            {
                currentDirection = currentDirection.Next();
            }

            HotkeysInput();
        }
Esempio n. 3
0
 public GridObject(int width, int height, GridObjectDirection direction)
 {
     this.width     = width;
     this.height    = height;
     this.direction = direction;
 }