Esempio n. 1
0
    public void Equip()
    {
        thisPanel.SetActive(false);

        GameObject target = null;

        if (gameItem.GetItemType() == "Personal Weapon")
        {
            target = crewEquip;
        }
        else if (gameItem.GetItemType() == "Ship Weapon")
        {
            target = shipEquip;

            EquipShipManager script = target.GetComponent <EquipShipManager>();
            script.weaponEquipping = (ShipWeapon)gameItem;
        }

        if (!target)
        {
            return;
        }

        target.SetActive(true);
    }
Esempio n. 2
0
 void Start()
 {
     managerScript = thisPanel.GetComponent <EquipShipManager>();
     thisButton.onClick.AddListener(OnClickEquip);
 }