Skip to content

Commit 1c48509

Browse files
committed
make CinematicHandler extend CinematicEvent for backward compatibility
1 parent de30e2e commit 1c48509

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

jme3-core/src/main/java/com/jme3/cinematic/CinematicHandler.java

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
package com.jme3.cinematic;
22

3+
import com.jme3.app.Application;
34
import com.jme3.cinematic.events.CinematicEvent;
4-
import com.jme3.export.Savable;
5+
import com.jme3.cinematic.events.CinematicEventListener;
56
import com.jme3.renderer.Camera;
67
import com.jme3.scene.CameraNode;
78

8-
public interface CinematicHandler extends Savable {
9+
/**
10+
* A interface that defines an object that can compose and coordinate cinematic events.
11+
*/
12+
public interface CinematicHandler extends CinematicEvent {
913

1014
/**
1115
* Adds a cinematic event to this cinematic at the given timestamp. This
@@ -128,4 +132,32 @@ public interface CinematicHandler extends Savable {
128132
*/
129133
void clearCameras();
130134

135+
/**
136+
* DO NOT implement this. This is a left-over from the previous problematic abstraction of the Cinematic
137+
* class. Kept just for backward compatibility.
138+
*
139+
* @param app
140+
* @param cinematic
141+
*/
142+
@Deprecated
143+
public default void initEvent(Application app, CinematicHandler cinematic) {
144+
145+
}
146+
147+
/**
148+
* Adds a CinematicEventListener to this handler.
149+
*
150+
* @param listener
151+
* CinematicEventListener
152+
*/
153+
void addListener(CinematicEventListener listener);
154+
155+
/**
156+
* Removes a CinematicEventListener from this handler.
157+
*
158+
* @param listener
159+
* CinematicEventListener
160+
*/
161+
void removeListener(CinematicEventListener listener);
162+
131163
}

0 commit comments

Comments
 (0)