/** * called internally don't call it directly. * * @param tpf */ @Override public void update(float tpf) { if (isInitialized() && playState == PlayState.Playing) { internalUpdate(tpf); } }
/** * called internally */ @Override public void onPlay() { if (isInitialized()) { if (playState == PlayState.Paused) { for (int i = 0; i < cinematicEvents.size(); i++) { CinematicEvent ce = cinematicEvents.get(i); if (ce.getPlayState() == PlayState.Paused) { ce.play(); } } } } }
/** * Adds a cinematic event to this cinematic at the given timestamp. This * operation returns a keyFrame * * @param timeStamp the time when the event will start after the beginning * of the cinematic * @param cinematicEvent the cinematic event * @return the keyFrame for that event. */ public KeyFrame addCinematicEvent(float timeStamp, CinematicEvent cinematicEvent) { KeyFrame keyFrame = timeLine.getKeyFrameAtTime(timeStamp); if (keyFrame == null) { keyFrame = new KeyFrame(); timeLine.addKeyFrameAtTime(timeStamp, keyFrame); } keyFrame.cinematicEvents.add(cinematicEvent); cinematicEvents.add(cinematicEvent); if (isInitialized()) { cinematicEvent.initEvent(null, this); } return keyFrame; }
/** * called internally don't call it directly. * * @param tpf */ @Override public void update(float tpf) { if (isInitialized() && playState == PlayState.Playing) { internalUpdate(tpf); } }
/** * called internally */ @Override public void onPlay() { if (isInitialized()) { if (playState == PlayState.Paused) { for (int i = 0; i < cinematicEvents.size(); i++) { CinematicEvent ce = cinematicEvents.get(i); if (ce.getPlayState() == PlayState.Paused) { ce.play(); } } } } }
/** * Adds a cinematic event to this cinematic at the given timestamp. This * operation returns a keyFrame * * @param timeStamp the time when the event will start after the beginning * of the cinematic * @param cinematicEvent the cinematic event * @return the keyFrame for that event. */ public KeyFrame addCinematicEvent(float timeStamp, CinematicEvent cinematicEvent) { KeyFrame keyFrame = timeLine.getKeyFrameAtTime(timeStamp); if (keyFrame == null) { keyFrame = new KeyFrame(); timeLine.addKeyFrameAtTime(timeStamp, keyFrame); } keyFrame.cinematicEvents.add(cinematicEvent); cinematicEvents.add(cinematicEvent); if (isInitialized()) { cinematicEvent.initEvent(null, this); } return keyFrame; }