示例#1
0
    // Use this for initialization
    void Start()
    {
        inventory = InventarySystem.instance;
        // inventory.onItemChangeCallback += UpdateUI;

        slots = itemsParent.GetComponentsInChildren <InventorySlot>();
    }
示例#2
0
    private void Awake()
    {
        if (instance != null)
        {
            Debug.LogError("More than one instance of inventory is trying to active");
            return;
        }

        instance = this;
    }
示例#3
0
    private void Awake()
    {
        DontDestroyOnLoad(gameObject);
        if (instance != null)
        {
            Debug.LogWarning("More than one instance of inventory is trying to active");
            return;
        }

        instance = this;
    }