Decouple the usage of PDT evaluator of chart player.
This commit is contained in:
@@ -10,6 +10,15 @@ using UnityEngine;
|
||||
|
||||
namespace Cryville.Crtr {
|
||||
public class PdtEvaluator : PdtEvaluatorBase {
|
||||
[ThreadStatic]
|
||||
static PdtEvaluator m_instance;
|
||||
public static PdtEvaluator Instance {
|
||||
get {
|
||||
if (m_instance == null) m_instance = new PdtEvaluator();
|
||||
return m_instance;
|
||||
}
|
||||
}
|
||||
|
||||
readonly Dictionary<PdtOperatorSignature, PdtOperator> _shortops = new Dictionary<PdtOperatorSignature, PdtOperator>();
|
||||
readonly IntKeyedDictionary<PdtOperator> _ctxops = new IntKeyedDictionary<PdtOperator>();
|
||||
|
||||
@@ -152,6 +161,18 @@ namespace Cryville.Crtr {
|
||||
ContextCascade[--_cascadeHeight].Clear();
|
||||
}
|
||||
|
||||
public void Reset() {
|
||||
_cascadeHeight = 0;
|
||||
ContextCascadeBlocks.Clear();
|
||||
ContextCascadeBlocks.Push(0);
|
||||
ContextEvent = null;
|
||||
ContextJudge = null;
|
||||
ContextSelfValue = null;
|
||||
ContextSkinContainer = null;
|
||||
ContextState = null;
|
||||
ContextTransform = null;
|
||||
}
|
||||
|
||||
public PdtEvaluator() {
|
||||
ContextCascadeBlocks.Push(0);
|
||||
for (int i = 0; i < ContextCascade.Length; i++) ContextCascade[i] = new IntKeyedDictionary<PropSrc>();
|
||||
|
Reference in New Issue
Block a user