Pull skin container and judge attachment to handler.
This commit is contained in:
@@ -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() { }
|
||||
|
@@ -50,8 +50,6 @@ namespace Cryville.Crtr.Event {
|
||||
public byte CloneType;
|
||||
private ContainerState rootPrototype = null;
|
||||
private ContainerState prototype = null;
|
||||
public SkinContainer skinContainer;
|
||||
public Judge judge;
|
||||
|
||||
public ContainerHandler Handler {
|
||||
get;
|
||||
@@ -210,8 +208,7 @@ namespace Cryville.Crtr.Event {
|
||||
}
|
||||
|
||||
public void AttachSystems(PdtSkin skin, Judge judge) {
|
||||
skinContainer = new SkinContainer(skin);
|
||||
this.judge = judge;
|
||||
Handler.AttachSystems(skin, judge);
|
||||
}
|
||||
|
||||
public Vector GetRawValue(Identifier key) {
|
||||
|
Reference in New Issue
Block a user