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); }
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"); } } }
public LootDrop(Item item, LootTable lootTable) { MyLootTable = lootTable; MyItem = item; }