Add event property for event.

This commit is contained in:
2023-02-21 18:41:32 +08:00
parent 1f1663d714
commit 82dbc5c479

View File

@@ -6,6 +6,7 @@ using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
using UnsafeIL;
namespace Cryville.Crtr {
[JsonConverter(typeof(BeatTimeConverter))]
@@ -154,6 +155,10 @@ namespace Cryville.Crtr {
protected ChartEvent() {
PropSrcs = new Dictionary<int, PropSrc>();
PropOps = new Dictionary<int, PropOp>();
SubmitPropSrc("event", new PropSrc.Float(() => {
int hash = GetHashCode();
return Unsafe.As<int, float>(ref hash);
}));
SubmitPropSrc("long", new PropSrc.Boolean(() => IsLong));
SubmitPropSrc("time", new PropSrc.BeatTime(() => time.Value));
SubmitPropSrc("endtime", new PropSrc.BeatTime(() => endtime.Value));