This commit is contained in:
Joseph Montanez 2022-01-23 11:53:42 +08:00 committed by GitHub
commit afa3cde839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,8 +111,19 @@ namespace Strawberry
private void TrackComponent(Component c)
{
for (let t in Tracker.AssignmentLists[c.GetType()])
for (let t in Tracker.AssignmentLists[c.GetType()]) {
// If component type not in tracker, add to tracker
var match = false;
for (let kvPair in componentTracker) {
if (kvPair.key == t) {
match = true;
}
}
if (!match) {
componentTracker.Add(t, new List<Component>());
}
componentTracker[t].Add(c);
}
}
private void UntrackComponent(Component c)