Пример #1
0
    private void Awake()
    {
        _inventoryPanelModel = gameObject.GetComponent <InventoryPanelModel>();
        _inventoryPanelView  = gameObject.GetComponent <InventoryPanelView>();

        slotList = new List <GameObject>();
    }
Пример #2
0
    /// <summary>
    /// 查找加载初始化.
    /// </summary>
    private void FindAndLoadInit()
    {
        m_InventoryPanelView  = gameObject.GetComponent <InventoryPanelView>();
        m_InventoryPanelModel = gameObject.GetComponent <InventoryPanelModel>();

        slotsList = new List <GameObject>(slotsNum);
    }
Пример #3
0
    private void Init()
    {
        m_InventoryPanelView  = gameObject.GetComponent <InventoryPanelView>();
        m_InventoryPanelModel = gameObject.GetComponent <InventoryPanelModel>();

        slotList = new List <GameObject>();
        itemList = new List <GameObject>();
    }
Пример #4
0
 void Start()
 {
     inventoryPanelView  = gameObject.GetComponent <InventoryPanelView>();
     inventoryPanelModel = gameObject.GetComponent <InventoryPanelModel>();
     CreateAllSlot();
     CreateALLItem();
     gameObject.SetActive(false);
 }
Пример #5
0
    /// <summary>
    ///  初始化乱七八糟的变量的函数
    /// </summary>
    private void InitOthers()
    {
        slotNumber = 30;
        slotList   = new List <GameObject>();

        m_Model = gameObject.GetComponent <InventoryPanelModel>();
        m_View  = gameObject.GetComponent <InventoryPanelView>();
    }
    void Start()
    {
        inventoryPanelModel = gameObject.GetComponent <InventoryPanelModel>();
        inventoryPanelView  = gameObject.GetComponent <InventoryPanelView>();


        slotList = new List <GameObject>();
        itemList = new List <GameObject>();

        CreateAllSlot();
        CreateAllItem();

        //整理背包按钮绑定
        inventoryPanelView.BagArrange_Btn.onClick.AddListener(() => BagArrange());
        //背包内id相同融合按钮绑定
        inventoryPanelView.IdFuse_Btn.onClick.AddListener(() => IdFuse());
    }