Exemplo n.º 1
0
 public void LoadInventory()                                                // carregar items salvos no gamemanager
 {
     for (int i = 0; i < GameManager.gm.weaponId.Length; i++)               // o tamanho do vetor de weaponid
     {
         AddWeapon(itemDataBase.GetWeapons(GameManager.gm.weaponId[i]));    // acrescentar o id da weapon
     }
     for (int i = 0; i < GameManager.gm.itemId.Length; i++)                 // o tamanho do vetor de weaponid
     {
         AddItem(itemDataBase.GetConsumableitem(GameManager.gm.itemId[i])); // acrescentar o id da weapon
     }
     for (int i = 0; i < GameManager.gm.armorId.Length; i++)                // o tamanho do vetor de weaponid
     {
         AddArmor(itemDataBase.GetArmor(GameManager.gm.armorId[i]));        // acrescentar o id da weapon
     }
     for (int i = 0; i < GameManager.gm.keyId.Length; i++)                  // o tamanho do vetor de weaponid
     {
         AddKey(itemDataBase.GetKey(GameManager.gm.keyId[i]));              // acrescentar o id da weapon
     }
 }