public void CreateLootTables()
 {
     foreach (string lootTableName in lootTableNames)
     {
         LootTable lootTable = SystemLootTableManager.MyInstance.GetNewResource(lootTableName);
         if (lootTable != null)
         {
             lootTables.Add(lootTable);
         }
     }
 }
 public LootTable GetNewResource(string resourceName)
 {
     //Debug.Log(this.GetType().Name + ".GetResource(" + resourceName + ")");
     if (!RequestIsEmpty(resourceName))
     {
         string keyName = prepareStringForMatch(resourceName);
         if (resourceList.ContainsKey(keyName))
         {
             LootTable returnValue = ScriptableObject.Instantiate(resourceList[keyName]) as LootTable;
             returnValue.SetupScriptableObjects();
             return(returnValue);
         }
     }
     return(null);
 }
Beispiel #3
0
 public void CreateLootTables()
 {
     if (SystemLootTableManager.MyInstance == null)
     {
         Debug.LogError("SystemLootTableManager not found.  Is the GameManager in the scene?");
         return;
     }
     foreach (string lootTableName in lootTableNames)
     {
         LootTable lootTable = SystemLootTableManager.MyInstance.GetNewResource(lootTableName);
         if (lootTable != null)
         {
             lootTables.Add(lootTable);
         }
         else
         {
             Debug.LogError("Could not find loot table " + lootTableName + " while initializing Loot Node");
         }
     }
 }
Beispiel #4
0
 public LootDrop(Item item, LootTable lootTable)
 {
     MyLootTable = lootTable;
     MyItem      = item;
 }