Pull skin container and judge attachment to handler.

This commit is contained in:
2022-11-19 22:02:05 +08:00
parent 1734cf9b72
commit 75652ecff1
3 changed files with 11 additions and 7 deletions

View File

@@ -63,6 +63,13 @@ namespace Cryville.Crtr.Event {
get { return cs.Container; }
}
public SkinContainer skinContainer;
public Judge judge;
public void AttachSystems(PdtSkin skin, Judge judge) {
skinContainer = new SkinContainer(skin);
this.judge = judge;
}
public ContainerHandler() { }
public abstract string TypeName {
get;
@@ -115,7 +122,7 @@ namespace Cryville.Crtr.Event {
public virtual void Update(ContainerState s, StampedEvent ev) {
bool flag = !Awoken && s.CloneType >= 2 && s.CloneType < 16;
if (flag) PreAwake(s);
if (Awoken && s.CloneType <= 2) if (gogroup) cs.skinContainer.MatchDynamic(s);
if (Awoken && s.CloneType <= 2) if (gogroup) skinContainer.MatchDynamic(s);
if (flag) Awake(s);
}
public virtual void ExUpdate(ContainerState s, StampedEvent ev) { }
@@ -123,7 +130,7 @@ namespace Cryville.Crtr.Event {
public virtual void EndUpdate(ContainerState s) {
if (s.CloneType < 16) {
Awoken = false;
if (gogroup && s.CloneType <= 2) cs.skinContainer.MatchDynamic(s);
if (gogroup && s.CloneType <= 2) skinContainer.MatchDynamic(s);
}
}
public virtual void Anchor() { }