Пример #1
0
    private void OnClickDrop()
    {
        ItemDetailsManager detailsScript = thisPanel.gameObject.GetComponent <ItemDetailsManager>();

        detailsScript.gameItem.Drop();

        thisPanel.SetActive(false);
        returnPanel.SetActive(true);
    }
Пример #2
0
    private void OnClickDetails()
    {
        thisPanel.SetActive(false);

        ItemDetailsManager detailsScript = detailsPanel.gameObject.GetComponent <ItemDetailsManager>();

        detailsScript.gameItem = refItem;
        detailsPanel.SetActive(true);
        //Once inventory is implemented, find a way to pass the button's stored object to the details panel
    }
Пример #3
0
    private void OnClickDetails()
    {
        if (PlayerStatus.Ship.weaponSlots[invSlot].equippedWeapon == null)
        {
            return;
        }

        thisPanel.SetActive(false);

        //Getting a reference to the script of the details panel, then setting the GameItem, isEquipped, and the return panel
        ItemDetailsManager detailsScript = detailsPanel.gameObject.GetComponent <ItemDetailsManager>();

        detailsScript.gameItem    = (GameItem)shipWeapon;
        detailsScript.isEquipped  = true;
        detailsScript.returnPanel = thisPanel;

        detailsPanel.SetActive(true);
        //Once inventory is implemented, find a way to pass the button's stored object to the details panel
    }
Пример #4
0
    private void OnClickEquip()
    {
        ItemDetailsManager detailsScript = thisPanel.gameObject.GetComponent <ItemDetailsManager>();

        detailsScript.Equip();
    }
 void Awake()
 {
     _instance = this;
 }