/// <summary> /// Updates the contents of the critter inventory. /// </summary> public void Render200ms(float _) { int id = GetWorldID(); var clusterManager = ClusterManager.Instance; if (clusterManager != null && clusterManager.activeWorldId == id) { // Reset existing count to zero foreach (var typePair in counts) { foreach (var speciesPair in typePair.Value) { var species = speciesPair.Value; species.Reserved = 0; species.Total = 0; } } discovered = false; CritterInventoryUtils.GetCritters(id, AddCritter); var inst = AllResourcesScreen.Instance; if (discovered && inst != null) { inst.Populate(null); } } }
/// <summary> /// Updates the contents of the critter inventory. /// </summary> public void Update() { // Reset existing count to zero foreach (var typePair in counts) { foreach (var speciesPair in typePair.Value) { var species = speciesPair.Value; species.Reserved = 0; species.Total = 0; } } discovered = false; CritterInventoryUtils.GetCritters(GetWorldID(), AddCritter); var inst = AllResourcesScreen.Instance; if (discovered && inst != null) { inst.Populate(null); } }