/** * schedule an event that will activate the camera at the given time * * @param timeStamp the time to activate the cam * @param cameraName the camera name (as registered in * Cinematic#bindCamera()) */ public void activateCamera(final float timeStamp, final String cameraName) { addCinematicEvent(timeStamp, new CameraEvent(this, cameraName)); }
/** * enqueue a cinematic event to a cinematic. This is a handy method when you * want to chain event of a given duration without knowing their initial * duration * * @param cinematicEvent the cinematic event to enqueue * @return the timestamp the event was scheduled. */ public float enqueueCinematicEvent(CinematicEvent cinematicEvent) { float scheduleTime = nextEnqueue; addCinematicEvent(scheduleTime, cinematicEvent); nextEnqueue += cinematicEvent.getInitialDuration(); return scheduleTime; }
cinematic.addCinematicEvent(0, new FadeEvent(true)); cinematic.addCinematicEvent(0, new AnimationEvent(teapot, "teapotAnim", LoopMode.DontLoop)); cinematic.addCinematicEvent(0, cameraMotionEvent); cinematic.addCinematicEvent(0, new SoundEvent("Sound/Environment/Nature.ogg", LoopMode.Loop)); cinematic.addCinematicEvent(3f, new SoundEvent("Sound/Effects/kick.wav")); cinematic.addCinematicEvent(3, new SubtitleTrack(nifty, "start", 3, "jMonkey engine really kicks A...")); cinematic.addCinematicEvent(5.1f, new SoundEvent("Sound/Effects/Beep.ogg", 1)); cinematic.addCinematicEvent(2, new AnimationEvent(model, "Walk", LoopMode.Loop)); cinematic.activateCamera(0, "topView"); cinematic.addCinematicEvent(19, new FadeEvent(false));
cinematic.addCinematicEvent(jumpStart+0.2f, new AnimationEvent(jaime, "JumpForward", LoopMode.DontLoop,1)); cinematic.enqueueCinematicEvent( new AnimationEvent(jaime, "JumpEnd", LoopMode.DontLoop)); cinematic.enqueueCinematicEvent( new AnimationEvent(jaime, "Punches", LoopMode.DontLoop)); camMotion.setDirectionType(MotionEvent.Direction.LookAt); camMotion.setLookAt(new Vector3f(0, 0.5f, 0), Vector3f.UNIT_Y); cinematic.addCinematicEvent(camStart, camMotion); cinematic.activateCamera(0, "cam");
/** * schedule an event that will activate the camera at the given time * * @param timeStamp the time to activate the cam * @param cameraName the camera name (as registered in * Cinematic#bindCamera()) */ public void activateCamera(final float timeStamp, final String cameraName) { addCinematicEvent(timeStamp, new CameraEvent(this, cameraName)); }
/** * enqueue a cinematic event to a cinematic. This is a handy method when you * want to chain event of a given duration without knowing their initial * duration * * @param cinematicEvent the cinematic event to enqueue * @return the timestamp the event was scheduled. */ public float enqueueCinematicEvent(CinematicEvent cinematicEvent) { float scheduleTime = nextEnqueue; addCinematicEvent(scheduleTime, cinematicEvent); nextEnqueue += cinematicEvent.getInitialDuration(); return scheduleTime; }