Cinematic, made sure an event is properly initialized when added during playback

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10017 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 12 years ago
parent e4b80ebb0d
commit 6a455731c7
  1. 9
      engine/src/core/com/jme3/cinematic/Cinematic.java

@ -259,11 +259,14 @@ public class Cinematic extends AbstractCinematicEvent implements AppState {
} }
keyFrame.cinematicEvents.add(cinematicEvent); keyFrame.cinematicEvents.add(cinematicEvent);
cinematicEvents.add(cinematicEvent); cinematicEvents.add(cinematicEvent);
if(isInitialized()){
cinematicEvent.initEvent(null, this);
}
return keyFrame; return keyFrame;
} }
/** /**
* removes the first occurence found of the given cinematicEvent. * removes the first occurrence found of the given cinematicEvent.
* *
* @param cinematicEvent the cinematicEvent to remove * @param cinematicEvent the cinematicEvent to remove
* @return true if the element has been removed * @return true if the element has been removed
@ -279,7 +282,7 @@ public class Cinematic extends AbstractCinematicEvent implements AppState {
} }
/** /**
* removes the first occurence found of the given cinematicEvent for the given time stamp. * 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 timeStamp the timestamp when the cinematicEvent has been added
* @param cinematicEvent the cinematicEvent to remove * @param cinematicEvent the cinematicEvent to remove
* @return true if the element has been removed * @return true if the element has been removed
@ -290,7 +293,7 @@ public class Cinematic extends AbstractCinematicEvent implements AppState {
} }
/** /**
* removes the first occurence found of the given cinematicEvent for the given keyFrame * removes the first occurrence found of the given cinematicEvent for the given keyFrame
* @param keyFrame the keyFrame returned by the addCinematicEvent method. * @param keyFrame the keyFrame returned by the addCinematicEvent method.
* @param cinematicEvent the cinematicEvent to remove * @param cinematicEvent the cinematicEvent to remove
* @return true if the element has been removed * @return true if the element has been removed

Loading…
Cancel
Save