예제 #1
0
        public void SetCurrentCell()
        {
            SetCurrentIndex();
            currentCell = mapAdapter.GetCellByIndex(currentIndex);
            currentCell.SetOccupyingObject(this.gameObject);

            CellState cellstate;

            if (gameObject.tag == "Player")
            {
                cellstate = CellState.occupiedParty;
            }
            else
            {
                cellstate = CellState.occupiedEnemy;
            }

            currentCell.state = cellstate;
            GridManager.Instance.gridState[currentIndex.x, currentIndex.y] = cellstate;
        }
예제 #2
0
 public GridCell GetCellByIndex(IntVector2 index)
 {
     return(mapAdapter.GetCellByIndex(index));
 }