示例#1
0
        void OnSelectBuilding(SelectBuildingEvent e)
        {
            if (e.Selected == null)
            {
                Hide();
                return;
            }

            PowerPlant powerPlant = e.Selected.GetComponent <PowerPlant>();

            if (powerPlant != null)
            {
                Show(powerPlant);
            }
            else
            {
                Hide();
            }
        }