Exemple #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);
    }
Exemple #2
0
 void Start()
 {
     managerScript = thisPanel.GetComponent <EquipShipManager>();
     thisButton.onClick.AddListener(OnClickEquip);
 }