diff --git a/Assets/Cryville/Crtr/ChartPlayer.cs b/Assets/Cryville/Crtr/ChartPlayer.cs index 6671268..44d27f0 100644 --- a/Assets/Cryville/Crtr/ChartPlayer.cs +++ b/Assets/Cryville/Crtr/ChartPlayer.cs @@ -508,7 +508,6 @@ namespace Cryville.Crtr { throw new ArgumentException("Input config not completed\nPlease complete the input settings"); } - cbus.AttachSystems(pskin, judge); Logger.Log("main", 0, "Load/WorkerThread", "Attaching handlers"); var ch = new ChartHandler(chart, dir); cbus.RootState.AttachHandler(ch); @@ -526,6 +525,7 @@ namespace Cryville.Crtr { ts.Value.AttachHandler(th); } } + cbus.AttachSystems(pskin, judge); Logger.Log("main", 0, "Load/WorkerThread", "Prehandling (iteration 1)"); using (var pbus = cbus.Clone(16)) { pbus.Forward(); diff --git a/Assets/Cryville/Crtr/Event/ContainerHandler.cs b/Assets/Cryville/Crtr/Event/ContainerHandler.cs index e45a594..14601d1 100644 --- a/Assets/Cryville/Crtr/Event/ContainerHandler.cs +++ b/Assets/Cryville/Crtr/Event/ContainerHandler.cs @@ -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() { } diff --git a/Assets/Cryville/Crtr/Event/ContainerState.cs b/Assets/Cryville/Crtr/Event/ContainerState.cs index 7ea9fd5..80b7b3a 100644 --- a/Assets/Cryville/Crtr/Event/ContainerState.cs +++ b/Assets/Cryville/Crtr/Event/ContainerState.cs @@ -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) {