/** * used internally to cleanup the cinematic. Called when the clear() method * is called */ @Override public void dispose() { for (CinematicEvent event : cinematicEvents) { event.dispose(); } } }
/** * removes the first occurrence found of the given cinematicEvent. * * @param cinematicEvent the cinematicEvent to remove * @return true if the element has been removed */ public boolean removeCinematicEvent(CinematicEvent cinematicEvent) { cinematicEvent.dispose(); cinematicEvents.remove(cinematicEvent); for (KeyFrame keyFrame : timeLine.values()) { if (keyFrame.cinematicEvents.remove(cinematicEvent)) { return true; } } return false; }
/** * removes the first occurrence found of the given cinematicEvent for the * given time stamp. * * @param timeStamp the timestamp when the cinematicEvent has been added * @param cinematicEvent the cinematicEvent to remove * @return true if the element has been removed */ public boolean removeCinematicEvent(float timeStamp, CinematicEvent cinematicEvent) { cinematicEvent.dispose(); KeyFrame keyFrame = timeLine.getKeyFrameAtTime(timeStamp); return removeCinematicEvent(keyFrame, cinematicEvent); }
/** * removes the first occurrence found of the given cinematicEvent for the * given keyFrame * * @param keyFrame the keyFrame returned by the addCinematicEvent method. * @param cinematicEvent the cinematicEvent to remove * @return true if the element has been removed */ public boolean removeCinematicEvent(KeyFrame keyFrame, CinematicEvent cinematicEvent) { cinematicEvent.dispose(); boolean ret = keyFrame.cinematicEvents.remove(cinematicEvent); cinematicEvents.remove(cinematicEvent); if (keyFrame.isEmpty()) { timeLine.removeKeyFrame(keyFrame.getIndex()); } return ret; }
/** * used internally to cleanup the cinematic. Called when the clear() method * is called */ @Override public void dispose() { for (CinematicEvent event : cinematicEvents) { event.dispose(); } } }
/** * removes the first occurrence found of the given cinematicEvent. * * @param cinematicEvent the cinematicEvent to remove * @return true if the element has been removed */ public boolean removeCinematicEvent(CinematicEvent cinematicEvent) { cinematicEvent.dispose(); cinematicEvents.remove(cinematicEvent); for (KeyFrame keyFrame : timeLine.values()) { if (keyFrame.cinematicEvents.remove(cinematicEvent)) { return true; } } return false; }
/** * removes the first occurrence found of the given cinematicEvent for the * given time stamp. * * @param timeStamp the timestamp when the cinematicEvent has been added * @param cinematicEvent the cinematicEvent to remove * @return true if the element has been removed */ public boolean removeCinematicEvent(float timeStamp, CinematicEvent cinematicEvent) { cinematicEvent.dispose(); KeyFrame keyFrame = timeLine.getKeyFrameAtTime(timeStamp); return removeCinematicEvent(keyFrame, cinematicEvent); }
/** * removes the first occurrence found of the given cinematicEvent for the * given keyFrame * * @param keyFrame the keyFrame returned by the addCinematicEvent method. * @param cinematicEvent the cinematicEvent to remove * @return true if the element has been removed */ public boolean removeCinematicEvent(KeyFrame keyFrame, CinematicEvent cinematicEvent) { cinematicEvent.dispose(); boolean ret = keyFrame.cinematicEvents.remove(cinematicEvent); cinematicEvents.remove(cinematicEvent); if (keyFrame.isEmpty()) { timeLine.removeKeyFrame(keyFrame.getIndex()); } return ret; }