void TileSelect(HexTile tile) { if (!tile) { gameManager.mapManager.SetSelectedTile(null); return; } HexTile lastSelected = gameManager.mapManager.lastSelectedTile; if (!lastSelected && tile.HasTeam()) { gameManager.mapManager.SetSelectedTile(tile); OnSelected?.Invoke(); } else if (lastSelected && tile != lastSelected) { gameManager.mapManager.SetFinalPath(tile); OnMoveOrder?.Invoke(); } else if (lastSelected && tile == lastSelected && !tile.Excavated()) { gameManager.mapManager.DeselectAll(); gameManager.TurnDig(tile); } else { OnActionDenided.Invoke(); } }
private void DebugInput() { if (Input.GetMouseButtonDown(1)) { HexTile tile = TileAtMouse(); if (!tile) { return; } if (!gameManager.mapManager.Reveal(tile)) { if (!tile.Excavated()) { List <Artifact> excavated = tile.Excavate(); //Debug.Log("Excavated " + excavated.Count + " artifacts!"); } } } }