Add BeatTime properties.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using RBeatTime = Cryville.Crtr.BeatTime;
|
||||
|
||||
namespace Cryville.Crtr {
|
||||
public abstract class PropOp : PdtOperator {
|
||||
@@ -52,6 +53,14 @@ namespace Cryville.Crtr {
|
||||
_cb((T)(object)result);
|
||||
}
|
||||
}
|
||||
public class BeatTime : PropOp {
|
||||
readonly Action<RBeatTime> _cb;
|
||||
public BeatTime(Action<RBeatTime> cb) { _cb = cb; }
|
||||
protected override unsafe void Execute() {
|
||||
var o = GetOperand(0);
|
||||
_cb(*(RBeatTime*)o.TrustedAsOfLength(sizeof(RBeatTime)));
|
||||
}
|
||||
}
|
||||
public class Vector2 : PropOp {
|
||||
readonly Action<UnityEngine.Vector2> _cb;
|
||||
public Vector2(Action<UnityEngine.Vector2> cb) { _cb = cb; }
|
||||
|
Reference in New Issue
Block a user