Pull current_time
to container handler.
This commit is contained in:
@@ -66,6 +66,8 @@ namespace Cryville.Crtr.Event {
|
||||
get { return cs.Container; }
|
||||
}
|
||||
|
||||
static readonly int _var_current_time = IdentifierManager.SharedInstance.Request("current_time");
|
||||
public readonly Dictionary<int, PropSrc> PropSrcs = new Dictionary<int, PropSrc>();
|
||||
SkinContainer skinContainer;
|
||||
protected Judge judge;
|
||||
public void AttachSystems(PdtSkin skin, Judge judge) {
|
||||
@@ -120,6 +122,7 @@ namespace Cryville.Crtr.Event {
|
||||
a_cur = RegisterAnchor(_a_cur);
|
||||
a_head = RegisterAnchor(_a_head, true);
|
||||
a_tail = RegisterAnchor(_a_tail, true);
|
||||
PropSrcs.Add(_var_current_time, new PropSrc.Float(() => (float)cs.rootPrototype.Time));
|
||||
}
|
||||
public virtual void Init() {
|
||||
skinContainer.MatchStatic(ps);
|
||||
@@ -182,6 +185,7 @@ namespace Cryville.Crtr.Event {
|
||||
protected static bool CanDoGraphicalUpdate(ContainerState s) { return s.CloneType >= 2 && s.CloneType < 16; }
|
||||
#region Anchor
|
||||
public virtual void Anchor() {
|
||||
foreach (var p in PropSrcs.Values) p.Invalidate();
|
||||
foreach (var a in DynamicAnchors.Keys) DynamicAnchorSet[a] = false;
|
||||
skinContainer.MatchDynamic(cs);
|
||||
if (cs.Active) PushAnchorEvent(cs.Time, a_cur);
|
||||
|
Reference in New Issue
Block a user