Beispiel #1
0
 private static LootTable GetTable()
 {
     if (_commonLootTable == null)
     {
         _commonLootTable = LootTable.Combine(Content.GetAll <LootTable>(COMMON_LOOT_PATH));
     }
     return(_commonLootTable);
 }
Beispiel #2
0
        public static LootTable Combine(params LootTable[] tables)
        {
            LootTable newTable = ScriptableObject.CreateInstance <LootTable>();

            foreach (LootTable table in tables)
            {
                foreach (LootItem item in table)
                {
                    newTable.AddItem(item);
                }
            }
            return(newTable);
        }