Class DefaultOrchestrator
java.lang.Object
com.csse3200.game.cutscene.runtime.DefaultOrchestrator
- All Implemented Interfaces:
CutsceneOrchestrator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
advance()
Key or click to advancevoid
Selects a choice (from choice events)Gets the cutsceneboolean
isRuning()
Returns the running state of the orchestrator (to dispose)void
Loads a cutscene from aCutscene
objectboolean
paused()
Check if the orchestrator is runningvoid
setPause
(boolean pause) Set the pause state of the orchestratorstate()
Get the current state of the orchestratorvoid
stop()
Permanently stops execution, required load to restart cutscenevoid
update
(float dt) Updates the state of the cutscene by delta time (dt)
-
Constructor Details
-
DefaultOrchestrator
public DefaultOrchestrator()
-
-
Method Details
-
load
Loads a cutscene from aCutscene
object- Specified by:
load
in interfaceCutsceneOrchestrator
- Parameters:
cutscene
- The cutscene to load
-
update
public void update(float dt) Updates the state of the cutscene by delta time (dt)- Specified by:
update
in interfaceCutsceneOrchestrator
- Parameters:
dt
- Delta time between game frames
-
advance
public void advance()Key or click to advance- Specified by:
advance
in interfaceCutsceneOrchestrator
-
choose
Selects a choice (from choice events)- Specified by:
choose
in interfaceCutsceneOrchestrator
- Parameters:
id
- The id of the choice made
-
state
Get the current state of the orchestrator- Specified by:
state
in interfaceCutsceneOrchestrator
- Returns:
- The current state of the orchestrator
-
paused
public boolean paused()Check if the orchestrator is running- Specified by:
paused
in interfaceCutsceneOrchestrator
- Returns:
- true if paused, false if running
-
isRuning
public boolean isRuning()Returns the running state of the orchestrator (to dispose)- Specified by:
isRuning
in interfaceCutsceneOrchestrator
- Returns:
- true if running, false otherwise
-
setPause
public void setPause(boolean pause) Set the pause state of the orchestrator- Specified by:
setPause
in interfaceCutsceneOrchestrator
- Parameters:
pause
- True to pause execution, false to continue execution
-
stop
public void stop()Permanently stops execution, required load to restart cutscene- Specified by:
stop
in interfaceCutsceneOrchestrator
-
getCutscene
Gets the cutscene- Returns:
- the cutscene
-