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; }
public GridCell GetCellByIndex(IntVector2 index) { return(mapAdapter.GetCellByIndex(index)); }