mirror of
https://github.com/MaddyThorson/StrawberryBF.git
synced 2025-05-10 10:06:05 +08:00
Update Scene.bf
Add type to componentTracker if the component's type key does not exist.
This commit is contained in:
parent
5962faf056
commit
f514bd5928
@ -104,7 +104,19 @@ namespace Strawberry
|
|||||||
|
|
||||||
private void TrackComponent(Component c)
|
private void TrackComponent(Component c)
|
||||||
{
|
{
|
||||||
|
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);
|
componentTracker[t].Add(c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UntrackComponent(Component c)
|
private void UntrackComponent(Component c)
|
||||||
|
Loading…
Reference in New Issue
Block a user