Exemple #1
0
    void  Awake()
    {
        InvManager     = FindObjectOfType(typeof(InventoryManager)) as InventoryManager; //Get the Inventory Manager object/script.
        InvEquipment   = FindObjectOfType(typeof(Equipment)) as Equipment;               //Get the Equipment script.
        InvSkillBar    = FindObjectOfType(typeof(SkillBar)) as SkillBar;                 //Get the skill bar script.
        CustomEvents   = FindObjectOfType(typeof(InventoryEvents)) as InventoryEvents;
        InvVendor      = FindObjectOfType(typeof(VendorUI)) as VendorUI;
        InvCraft       = FindObjectOfType(typeof(CraftManager)) as CraftManager;
        InvContainer   = FindObjectOfType(typeof(ContainerUI)) as ContainerUI;
        InvEquipmentUI = FindObjectOfType(typeof(EquipmentUI)) as EquipmentUI;
        InvItemGroup   = FindObjectOfType(typeof(ItemGroupUI)) as ItemGroupUI;

        //Setting up rect transforms:
        UICanvasTrans = UICanvas.GetComponent <RectTransform>();
        PanelTrans    = Panel.GetComponent <RectTransform>();

        SetInvPosition();       // Set the default position of the inventory backdrop.
        CreateRiches();         //Set all riches slots.

        ActionMenu.gameObject.SetActive(false);
        DropMenu.gameObject.SetActive(false);


        ShowInv = false;
        // Panel.SetActive(false); //--hide at start
    }
Exemple #2
0
 void  Awake()
 {
     InvUI          = FindObjectOfType(typeof(InventoryUI)) as InventoryUI;
     VendorPanel    = FindObjectOfType(typeof(VendorUI)) as VendorUI;
     SkillBarPanel  = FindObjectOfType(typeof(SkillBarUI)) as SkillBarUI;
     EquipmentPanel = FindObjectOfType(typeof(EquipmentUI)) as EquipmentUI;
     InvContainer   = FindObjectOfType(typeof(ContainerUI)) as ContainerUI;
     InvCraft       = FindObjectOfType(typeof(CraftUI)) as CraftUI;
     InvItemGroup   = FindObjectOfType(typeof(ItemGroupUI)) as ItemGroupUI;
     HoverScript    = FindObjectOfType(typeof(HoverItem)) as HoverItem;
 }