/** * used internally * * @param stateManager the state manager * @param app the application */ public void initialize(AppStateManager stateManager, Application app) { initEvent(app, this); for (CinematicEvent cinematicEvent : cinematicEvents) { cinematicEvent.initEvent(app, this); } if(!cameras.isEmpty()){ for(CameraNode n : cameras.values()){ n.setCamera(app.getCamera()); } } initialized = true; }
/** * 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; }
/** * used internally * * @param stateManager the state manager * @param app the application */ public void initialize(AppStateManager stateManager, Application app) { initEvent(app, this); for (CinematicEvent cinematicEvent : cinematicEvents) { cinematicEvent.initEvent(app, this); } if(!cameras.isEmpty()){ for(CameraNode n : cameras.values()){ n.setCamera(app.getCamera()); } } initialized = true; }
/** * 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; }