Decouple the usage of PDT evaluator of chart player.
This commit is contained in:
@@ -60,8 +60,6 @@ namespace Cryville.Crtr {
|
||||
public static float sv = 16f;
|
||||
|
||||
public static Dictionary<Identifier, MotionRegistry> motionRegistry;
|
||||
|
||||
public static PdtEvaluator etor;
|
||||
#endregion
|
||||
|
||||
#region MonoBehaviour
|
||||
@@ -548,7 +546,7 @@ namespace Cryville.Crtr {
|
||||
effectManager.Dispose();
|
||||
effectManager = null;
|
||||
}
|
||||
etor = null;
|
||||
PdtEvaluator.Instance.Reset();
|
||||
motionRegistry = null;
|
||||
Logger.Log("main", 1, "Game", "Stopped");
|
||||
}
|
||||
@@ -614,7 +612,7 @@ namespace Cryville.Crtr {
|
||||
};
|
||||
|
||||
using (StreamReader reader = new StreamReader(info.chartFile.FullName, Encoding.UTF8)) {
|
||||
etor = new PdtEvaluator();
|
||||
PdtEvaluator.Instance.Reset();
|
||||
|
||||
LoadRuleset(info.rulesetFile); loadPregress = .05f;
|
||||
|
||||
@@ -634,7 +632,7 @@ namespace Cryville.Crtr {
|
||||
|
||||
Logger.Log("main", 0, "Load/WorkerThread", "Initializing judge and input"); loadPregress = .35f;
|
||||
judge = new Judge(this, pruleset);
|
||||
etor.ContextJudge = judge;
|
||||
PdtEvaluator.Instance.ContextJudge = judge;
|
||||
|
||||
inputProxy = new InputProxy(pruleset, judge, screenSize);
|
||||
inputProxy.LoadFrom(_rscfg.inputs);
|
||||
@@ -686,7 +684,7 @@ namespace Cryville.Crtr {
|
||||
if (ruleset.format != Ruleset.CURRENT_FORMAT) throw new FormatException("Invalid ruleset file version");
|
||||
ruleset.LoadPdt(dir);
|
||||
pruleset = ruleset.Root;
|
||||
pruleset.Optimize(etor);
|
||||
pruleset.Optimize(PdtEvaluator.Instance);
|
||||
}
|
||||
RMVPool.Shared = new RMVPool();
|
||||
MotionCachePool.Shared = new MotionCachePool();
|
||||
@@ -698,7 +696,7 @@ namespace Cryville.Crtr {
|
||||
Logger.Log("main", 0, "Load/WorkerThread", "Loading skin: {0}", file);
|
||||
skin.LoadPdt(dir);
|
||||
pskin = skin.Root;
|
||||
pskin.Optimize(etor);
|
||||
pskin.Optimize(PdtEvaluator.Instance);
|
||||
effectManager = new EffectManager(pskin);
|
||||
}
|
||||
#endregion
|
||||
|
Reference in New Issue
Block a user