Code cleanup with the implementation of property store.

This commit is contained in:
2023-08-02 17:20:45 +08:00
parent e34a9cc868
commit 5393ff1451
9 changed files with 122 additions and 99 deletions

View File

@@ -10,7 +10,6 @@ using UnityEngine;
namespace Cryville.Crtr {
public class PdtEvaluator : PdtEvaluatorBase {
[ThreadStatic]
static PdtEvaluator m_instance;
public static PdtEvaluator Instance {
get {
@@ -41,7 +40,7 @@ namespace Cryville.Crtr {
else if (name == _var_false) { LoadNum(0); type = PdtInternalType.Number; value = _numbuf; }
else if (name == _var_null) { LoadIdent(0); type = PdtInternalType.Undefined; value = _numbuf; }
else {
PropSrc prop; SkinVariable variable;
PropSrc prop; PropStores.Float variable;
if (ContextEvent != null && ContextEvent.PropSrcs.TryGetValue(name, out prop)) {
prop.Get(out type, out value);
}
@@ -55,7 +54,7 @@ namespace Cryville.Crtr {
RevokePotentialConstant();
}
else if (ContextSkinContainer != null && ContextSkinContainer.Variables.TryGetValue(name, out variable)) {
variable.Src.Get(out type, out value);
variable.Source.Get(out type, out value);
}
else if (ContextJudge != null && ContextJudge.TryGetScoreSrc(name, out prop)) {
prop.Get(out type, out value);