Implement input name evaluation. Implement context state.
This commit is contained in:
@@ -214,27 +214,31 @@ namespace Cryville.Crtr.Event {
|
||||
this.judge = judge;
|
||||
}
|
||||
|
||||
public T GetRawValue<T>(Identifier key) where T : Vector {
|
||||
public Vector GetRawValue(Identifier key) {
|
||||
Vector tr;
|
||||
if (!CachedValues.TryGetValue(key, out tr)) {
|
||||
tr = (Vector)ReflectionHelper.InvokeEmptyConstructor(typeof(T));
|
||||
tr = (Vector)ReflectionHelper.InvokeEmptyConstructor(ChartPlayer.motionRegistry[key].Type);
|
||||
CachedValues.Add(key, tr);
|
||||
CachedValueStates[key] = false;
|
||||
}
|
||||
T r = (T)tr;
|
||||
Vector r = tr;
|
||||
#if !DISABLE_CACHE
|
||||
if (CachedValueStates[key]) return r;
|
||||
#endif
|
||||
float reltime = 0;
|
||||
if (rootPrototype != null) reltime = Time - rootPrototype.Time;
|
||||
GetMotionValue(key).GetValue(reltime, ref r);
|
||||
if (Parent != null) r.ApplyFrom(Parent.GetRawValue<T>(key));
|
||||
if (Parent != null) r.ApplyFrom(Parent.GetRawValue(key));
|
||||
#if !DISABLE_CACHE
|
||||
CachedValueStates[key] = true;
|
||||
#endif
|
||||
return r;
|
||||
}
|
||||
|
||||
public T GetRawValue<T>(Identifier key) where T : Vector {
|
||||
return (T)GetRawValue(key);
|
||||
}
|
||||
|
||||
static readonly Identifier n_pt = new Identifier("pt");
|
||||
public Vector2 ScreenPoint {
|
||||
get {
|
||||
|
Reference in New Issue
Block a user