Add temporary event discard handling.

This commit is contained in:
2023-01-16 15:09:34 +08:00
parent 43c87fba70
commit 4222176979
3 changed files with 15 additions and 0 deletions

View File

@@ -136,6 +136,11 @@ namespace Cryville.Crtr.Event {
tev.Target = anchor;
ts.Bus.PushTempEvent(tev);
}
public virtual void Discard(ContainerState s, StampedEvent ev) {
if (ev is StampedEvent.Anchor) {
anchorEvPool.Return((StampedEvent.Anchor)ev);
}
}
public virtual void Update(ContainerState s, StampedEvent ev) {
bool flag = !Awoken && s.CloneType >= 2 && s.CloneType < 16;
if (flag) PreAwake(s);