Add rewind and tick mechanism for skin component.
This commit is contained in:
@@ -42,6 +42,8 @@ namespace Cryville.Crtr.Event {
|
||||
/// </summary>
|
||||
protected Transform gogroup;
|
||||
|
||||
SkinComponent[] _comps;
|
||||
|
||||
public Vector3 Position { get; protected set; }
|
||||
public Quaternion Rotation { get; protected set; }
|
||||
public bool Alive { get; private set; }
|
||||
@@ -129,8 +131,8 @@ namespace Cryville.Crtr.Event {
|
||||
skinContainer.MatchStatic();
|
||||
ChartPlayer.etor.ContextEvent = null;
|
||||
ChartPlayer.etor.ContextState = null;
|
||||
foreach (var i in gogroup.GetComponentsInChildren<SkinComponent>())
|
||||
i.Init();
|
||||
_comps = gogroup.GetComponentsInChildren<SkinComponent>();
|
||||
foreach (var i in _comps) i.Init();
|
||||
}
|
||||
public virtual void PostInit() {
|
||||
PropSrcs.Add(_var_current_time, new PropSrc.Float(() => (float)cs.rootPrototype.Time));
|
||||
@@ -205,6 +207,7 @@ namespace Cryville.Crtr.Event {
|
||||
atime_head = cs.StampedContainer.Time;
|
||||
atime_tail = atime_head + cs.StampedContainer.Duration;
|
||||
MatchDynamic(cs, 0);
|
||||
foreach (var i in _comps) i.Tick(skinContainer, cs.Time);
|
||||
if (cs.Active) PushAnchorEvent(cs.Time, a_cur);
|
||||
if (double.IsNaN(DynamicAnchorSetTime[_a_head])) DynamicAnchorSetTime[_a_head] = atime_head;
|
||||
if (double.IsNaN(DynamicAnchorSetTime[_a_tail])) DynamicAnchorSetTime[_a_tail] = atime_tail;
|
||||
|
Reference in New Issue
Block a user