Exemplo n.º 1
0
        //--------------------------------------------------------------------------------------
        public void BuildingActivatedEvent(GameObject _newSelection)
        {

            if (_newSelection == this.gameObject) return;
            if (TerrainButtonState == TERRAINBUTTONSTATE.ACTIVE)
            {
                TerrainButtonState = TERRAINBUTTONSTATE.INACTIVE;
                BroadcastMessage("HideText");
            }
        }
Exemplo n.º 2
0
        //--------------------------------------------------------------------------------------
        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;


        }
Exemplo n.º 3
0
 //--------------------------------------------------------------------------------------
 public void OnClick()
 {
     TerrainButtonState = (m_terrainButtonState == TERRAINBUTTONSTATE.ACTIVE) ? TERRAINBUTTONSTATE.INACTIVE : TERRAINBUTTONSTATE.ACTIVE;
     TerrainDemoUIController.Instance.SelectionChanged(this.gameObject);
 }