public void SetSelectedTile(HexMapTile tile) { selectedTile = tile; gameObject.SetActive(selectedTile != null); if (selectedTile != null) { xCoordLabel.text = selectedTile.TileCoords.x.ToString(); yCoordLabel.text = selectedTile.TileCoords.z.ToString(); typeDropdown.value = (int)selectedTile.HexTileData.TileType; } else { typeDropdown.value = 0; } }
public void SelectMapTile(HexMapTile newSelectedTile) { if (newSelectedTile == selectedTile) { selectedTile.SetSelected(false); selectedTile = null; UpdateSelectedTilePanel(); return; } if(selectedTile != null) { selectedTile.SetSelected(false); } selectedTile = newSelectedTile; selectedTile.SetSelected(true); UpdateSelectedTilePanel(); }
// Use this for initialization void Start() { Debug.Log("Start Hex Map"); baseTileObject = GameObject.FindObjectOfType<HexMapTile>(); }
public void ClearMapTiles() { mapSpawner.ClearMapRoot(); selectedTile = null; hexMap = new HexMap(); loadedMapFileIndex = -1; _hexTileLookup = new Dictionary<string, int>(); }
public void AddTile(HexMapTile tempTile) { hexMap.AddTile(tempTile); HexTileLookup.Add(tempTile.TileCoords.x + "," + tempTile.TileCoords.z, MapManager.Instance.hexMap.HexTiles.Count - 1); }
public void SelectAll() { foreach (HexMapTile tile in MapManager.Instance.hexMap.HexTiles) { tile.SetSelected(true); } selectedTile = null; }
public void AddTile(HexMapTile newTile) { _hexTiles.Add(newTile); }
public HexMapSpawner() { Debug.Log("Hex Map Spawner: start"); baseTileObject = GameObject.FindObjectOfType<HexMapTile>(); baseTileObject.gameObject.SetActive(false); }