예제 #1
0
        private void OnCellClick(CubeGridCell cell)
        {
            switch (action)
            {
            case TestAction.DestroyOnClick:
                DestroyClickedCell(cell);
                break;

            case TestAction.SetPositionOnClick:
                movementTest.Cubxel = cell.Cubxel;
                break;
            }
        }
예제 #2
0
        private void DestroyClickedCell(CubeGridCell cell)
        {
            CubeTile tile = Cube.Current.GetTile(cell.Cubxel);

            if (tile)
            {
                Destroy(tile.gameObject);
            }
            else
            {
                Debug.Log("Tile not found:" + cell.Cubxel.ToString());
            }
        }