Decouple the usage of PDT evaluator of chart player.
This commit is contained in:
@@ -90,10 +90,10 @@ namespace Cryville.Crtr {
|
||||
etor.Optimize(_exp);
|
||||
}
|
||||
public override IEnumerable<ChartEvent> Match(ChartEvent ev) {
|
||||
ChartPlayer.etor.ContextEvent = ev;
|
||||
if (!ChartPlayer.etor.Evaluate(_op, _exp))
|
||||
PdtEvaluator.Instance.ContextEvent = ev;
|
||||
if (!PdtEvaluator.Instance.Evaluate(_op, _exp))
|
||||
throw new EvaluationFailureException();
|
||||
ChartPlayer.etor.ContextEvent = null;
|
||||
PdtEvaluator.Instance.ContextEvent = null;
|
||||
if (_flag) return new ChartEvent[] { ev };
|
||||
else return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user