コード例 #1
0
    private void Start()
    {
        inventory = _Inventory.instance;
        int numSlots = System.Enum.GetNames(typeof(EquipmentSlot)).Length;

        currentEquipment = new Equipment[numSlots];
    }
コード例 #2
0
ファイル: _Inventory.cs プロジェクト: bubbleppdoge/RPG
 void Awake()
 {
     if (instance != null)
     {
         Debug.Log("More than one instance of _Inventory found!");
         return;
     }
     instance = this;
 }
コード例 #3
0
 void Awake()              // added by me
 {
     if (instance != null) // added by me
     {
         Debug.LogWarning(" More than one instance of Inventory found!");
         return;
     }// added by me
     instance = this;
 }
コード例 #4
0
ファイル: _EquipmentManager.cs プロジェクト: bubbleppdoge/RPG
    void Start()
    {
        int numSlot = System.Enum.GetNames(typeof(_EquipmentSlot)).Length;

        currentEquipments = new _Equipment[numSlot];
        currentMeshs      = new SkinnedMeshRenderer[numSlot];
        inventory         = _Inventory.instance;

        EquipDefaultEquipment();
    }
コード例 #5
0
ファイル: _InventoryUI.cs プロジェクト: bubbleppdoge/RPG
 void Start()
 {
     inventory      = _Inventory.instance;
     inventorySlots = itemParent.GetComponentsInChildren <_InventorySlot> ();
     inventory.onItemChangedCallBack += UpdateUI;
 }
コード例 #6
0
 void Start()
 {
     instance = this;
     updatePanelSlots();
 }