コード例 #1
0
    void Awake()
    {
        if (instance != null)
        {
            Debug.LogWarning("More than one instance of Inventory found!");
            return;
        }

        instance = this;
    }
コード例 #2
0
 void Start()
 {
     inventory = GhostInvScriptLuca.instance;
     inventory.OnItemChangedCallback += UpdateUI;
     slots = itemsParent.GetComponentsInChildren <InventorySlot>();
 }