Fix StartUpdate on root state not called.

This commit is contained in:
2022-11-19 22:04:41 +08:00
parent 75652ecff1
commit 28cad97bbb

View File

@@ -24,6 +24,7 @@ namespace Cryville.Crtr.Event {
Expand();
AttachBus();
RootState.Working = true;
RootState.StartUpdate();
}
public EventBus Clone(byte ct, float offsetTime = 0) {
@@ -35,6 +36,7 @@ namespace Cryville.Crtr.Event {
r.invalidatedStates = new HashSet<ContainerState>();
r.Time += offsetTime;
r.RootState = RootState.Clone(ct);
r.RootState.StartUpdate();
r.Expand();
r.AttachBus();
foreach (var s in r.states) r.invalidatedStates.Add(s.Value);