//-------------------------------------------------------------------------------------- public void BuildingActivatedEvent(GameObject _newSelection) { if (_newSelection == this.gameObject) return; if (TerrainButtonState == TERRAINBUTTONSTATE.ACTIVE) { TerrainButtonState = TERRAINBUTTONSTATE.INACTIVE; BroadcastMessage("HideText"); } }
//-------------------------------------------------------------------------------------- private void changeState(TERRAINBUTTONSTATE _value) { if (m_terrainButtonState == _value) return; Color _newColor; if (_value == TERRAINBUTTONSTATE.ACTIVE) { _newColor = m_activeColor; } else { _newColor = m_inactiveColor; } StartCoroutine(changeObjectMaterialColor(_newColor)); m_terrainButtonState = _value; }
//-------------------------------------------------------------------------------------- public void OnClick() { TerrainButtonState = (m_terrainButtonState == TERRAINBUTTONSTATE.ACTIVE) ? TERRAINBUTTONSTATE.INACTIVE : TERRAINBUTTONSTATE.ACTIVE; TerrainDemoUIController.Instance.SelectionChanged(this.gameObject); }