public override void started(float timelineTime, Clock clock) { startTranslation = this.PropSimObject.Translation; startRotation = this.PropSimObject.Rotation; finished = false; propBehavior = PropSimObject.getElement(PropFactory.FadeBehaviorName) as PropFadeBehavior; }
private void destroyProp() { if (simObject != null && !KeepOpen && !currentlyEditing) { simObject.destroy(); simObject = null; propFade = null; } }
private void makeProp() { if (simObject == null) { simObject = TimelineController.PropFactory.createProp(propType, translation, rotation); if (simObject != null) { propFade = simObject.getElement(PropFactory.FadeBehaviorName) as PropFadeBehavior; } } }
public override void skipTo(float timelineTime) { if (timelineTime <= EndTime) { started(timelineTime, null); } else { propBehavior = PropSimObject.getElement(PropFactory.FadeBehaviorName) as PropFadeBehavior; propBehavior.changePosition(endTranslation, endRotation); finished = true; } }
public override void update(float timelineTime, Clock clock) { float endTime = StartTime + Duration; if (propFade != null && timelineTime > endTime - fadeDuration) { propFade.fade(0.0f, fadeDuration); propFade = null; //Null this out, we are done with it here. } sequencer.update(clock); if (Updated != null) { Updated.Invoke(timelineTime - StartTime); } finished = timelineTime > endTime; }
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); }