示例#1
0
        private void ActivateControlPanel(object sender, ItemSelectedArgs e)
        {
            //Activate vehicle control panel if the object is movable
            if (e.itemObj.GetComponent <MovableItem>() != null && e.itemObj.GetComponent <BuildingItem>() == null)
            {
                vehicleControlPanel.SetActive(true);
                factoryControlPanel.SetActive(false);
            }
            else if (e.itemObj.GetComponent <BuildingItem>() != null && e.itemObj.GetComponent <MovableItem>() == null)
            {
                factoryControlPanel.SetActive(true);
                vehicleControlPanel.SetActive(false);
            }

            else
            {
                factoryControlPanel.SetActive(false);
                vehicleControlPanel.SetActive(false);
            }
        }
示例#2
0
 private void ItemSelectedHandler(object sender, ItemSelectedArgs e)
 {
     HandleSelectObj(e.itemObj);
 }