Move arbitrary property operator to PropOp.

This commit is contained in:
2022-11-06 00:30:36 +08:00
parent 9d4f938675
commit 7f02b75b29
2 changed files with 11 additions and 11 deletions

View File

@@ -8,6 +8,15 @@ using RBeatTime = Cryville.Crtr.BeatTime;
namespace Cryville.Crtr {
public abstract class PropOp : PdtOperator {
internal PropOp() : base(1) { }
public class Arbitrary : PropOp {
public int Name { get; set; }
protected override void Execute() {
var op = GetOperand(0);
var value = new byte[op.Length];
op.CopyTo(value, 0);
ChartPlayer.etor.ContextCascadeUpdate(Name, new PropSrc.Arbitrary(op.Type, value));
}
}
public class Boolean : PropOp {
readonly Action<bool> _cb;
public Boolean(Action<bool> cb) { _cb = cb; }