public override void started(float timelineTime, Clock clock) { finished = false; makeProp(); if (propFade != null) { propFade.hide(); propFade.fade(1.0f, fadeDuration); } sequencer.start(); }
public override void skipTo(float timelineTime) { propBehavior = PropSimObject.getElement(PropFactory.FadeBehaviorName) as PropFadeBehavior; if (timelineTime <= EndTime) { //Figure out how transparent we should be //This is pretty screwy right now, but whatever can fix later. if (Duration != 0.0f) { float partialFade = ((timelineTime - StartTime) / Duration) * transparency; propBehavior.CurrentTransparency += (transparency - propBehavior.CurrentTransparency) * partialFade; } propBehavior.fade(transparency, EndTime - timelineTime); } else { propBehavior.fade(transparency, 0.0f); finished = true; } }
public override void started(float timelineTime, Clock clock) { finished = false; propBehavior = PropSimObject.getElement(PropFactory.FadeBehaviorName) as PropFadeBehavior; propBehavior.fade(transparency, Duration); }