Beispiel #1
0
    private void Awake()
    {
        if (statsPanel == null)
        {
            statsPanel = FindObjectOfType <StatsPanel> ();
        }

        if (inventory == null)
        {
            inventory = FindObjectOfType <Inventory> ();
        }

        if (equipmentPanel == null)
        {
            equipmentPanel = FindObjectOfType <EquipmentPanel> ();
        }

        if (activeItemSlot == null)
        {
            activeItemSlot = FindObjectOfType <ActiveItemSlot> ();
        }

        statsPanel.SetStats(Power, Defanse, Range);
        statsPanel.UpdateStatValues();
        statsPanel.UpdateStatNames();

        SetStats();

        inventory.OnItemClickEvent      += EquipFromInventory;
        equipmentPanel.OnItemClickEnvet += UnequipFromEquipPanel;
    }
 private void InitUI()
 {
     _activeItemSlot   = GameObject.Find("UI/Common/ActiveItemSlot").GetComponent <ActiveItemSlot>();
     _spellBookIcon    = GameObject.Find("UI/Common/BooksIcon/SpellBook").GetComponent <BookIcon>();
     _necronomiconIcon = GameObject.Find("UI/Common/BooksIcon/Necronomicon").GetComponent <BookIcon>();
     _damegedEffect    = GameObject.Find("UI/Common/DamegedEffect");
     _damegedEffect.SetActive(false);
 }