A base class for game scenes. More...
#include <Scene.h>
Public Types | |
using | Ptr = std::unique_ptr< Scene > |
Unique Scene pointer. More... | |
Public Member Functions | |
Scene () | |
Default Constructor. More... | |
Scene (const Scene &)=delete | |
Copy constructor. More... | |
Scene & | operator= (const Scene &)=delete |
Copy assignment operator. More... | |
Scene (Scene &&) noexcept | |
Move constructor. More... | |
Scene & | operator= (Scene &&) noexcept |
Move assignment operator. More... | |
virtual void | onInit () |
Handle a scene initialization. More... | |
virtual void | onEnter () |
Handle a scene enter. More... | |
virtual void | onHandleEvent (Event event) |
Handle a scene system event. More... | |
virtual void | onPreUpdate (Time deltaTime) |
Handle a scene pre-update. More... | |
virtual void | onUpdate (Time deltaTime) |
Handle a scene frame-rate dependent update. More... | |
virtual void | onFixedUpdate (Time deltaTime) |
Handle a scene frame-rate independent update. More... | |
virtual void | onPostUpdate (Time deltaTime) |
Handle a scene post-update update. More... | |
virtual void | onPreRender () |
Handle a scene pre-render event. More... | |
virtual void | onPostRender () |
Handle a scene post-render event. More... | |
virtual void | onPause () |
Handle a scene pause event. More... | |
virtual void | onResume () |
Handle a scene resume event. More... | |
virtual void | onCache () |
Handle a scene cache event. More... | |
virtual void | onResumeFromCache () |
Handle a scene 'resume from cache' event. More... | |
virtual void | onExit () |
Handle a scene exit event. More... | |
virtual void | onFrameBegin () |
Handle a scene frame begin event. More... | |
virtual void | onFrameEnd () |
Handle a scene frame end event. More... | |
std::string | getClassName () const override |
Get the name of this class. More... | |
bool | isEntered () const |
Check if the scene has been entered or not. More... | |
bool | isPaused () const |
Check if the scene is paused or not. More... | |
void | setVisibleOnPause (bool visible) |
Set whether or not the scene is visible when it is paused. More... | |
bool | isVisibleOnPause () const |
Check if the scene is visible when paused. More... | |
void | setBackgroundScene (Scene::Ptr scene) |
Add a background scene to this scene. More... | |
Scene * | getParentScene () |
Get the scene this scene is a background of. More... | |
const Scene * | getParentScene () const |
Scene * | getBackgroundScene () |
Get the background scene of this scene. More... | |
const Scene * | getBackgroundScene () const |
bool | isBackgroundScene () const |
Check if the scene is in a background scene. More... | |
bool | hasBackgroundScene () const |
Check if the scene has a background scene or not. More... | |
void | setBackgroundSceneDrawable (bool drawable) |
Set whether or not the scenes background scene is rendered. More... | |
bool | isBackgroundSceneDrawable () const |
Check if the scenes background scene is rendered. More... | |
void | setBackgroundSceneUpdateEnable (bool enable) |
Set whether or not the scenes background scene receives time updates. More... | |
bool | isBackgroundSceneUpdateEnabled () const |
Check if the scenes background scene receives time updates or not. More... | |
void | setBackgroundSceneEventsEnable (bool enable) |
Enable or disable events for the scenes background scene. More... | |
bool | isBackgroundSceneEventsEnabled () const |
Check if events are enabled for the background scene or not. More... | |
void | setCached (bool cache, const std::string &alias="") |
Cache or uncahe the scene. More... | |
bool | isCached () const |
Check if the scene is cached or not. More... | |
void | setTimescale (float timescale) |
Set the scene timescale factor. More... | |
float | getTimescale () const |
Get the scenes timescale factor. More... | |
Engine & | getEngine () |
Get a reference to the game engine. More... | |
const Engine & | getEngine () const |
Window & | getWindow () |
Get the game window. More... | |
const Window & | getWindow () const |
Camera & | getCamera () |
Get the scene level camera. More... | |
const Camera & | getCamera () const |
CameraContainer & | getCameras () |
Get the scene level camera container. More... | |
const CameraContainer & | getCameras () const |
PhysicsEngine & | getPhysicsEngine () |
Get the scene level physics engine/simulation. More... | |
const PhysicsEngine & | getPhysicsEngine () const |
GridMoverContainer & | getGridMovers () |
Get the scene level GridMover container. More... | |
const GridMoverContainer & | getGridMovers () const |
EventEmitter & | getEventEmitter () |
Get the scene level event EventEmitter. More... | |
const EventEmitter & | getEventEmitter () const |
EventDispatcher & | getGlobalEventEmitter () |
Get the global event emitter. More... | |
input::InputManager & | getInput () |
Get the scene level input manager. More... | |
const input::InputManager & | getInput () const |
audio::AudioManager & | getAudio () |
Get the scene level audio manager. More... | |
const audio::AudioManager & | getAudio () const |
TimerManager & | getTimer () |
Get the scene level timer manager. More... | |
const TimerManager & | getTimer () const |
PropertyContainer & | getCache () |
Get the engine level cache. More... | |
const PropertyContainer & | getCache () const |
PrefContainer & | getSCache () |
Get the engine level savable cache. More... | |
const PrefContainer & | getSCache () const |
RenderLayerContainer & | getRenderLayers () |
Get the scene render layers. More... | |
const RenderLayerContainer & | getRenderLayers () const |
Grid2D & | getGrid () |
Get the scene level grid. More... | |
const Grid2D & | getGrid () const |
ui::GuiContainer & | getGui () |
Get the scene level gui container. More... | |
const ui::GuiContainer & | getGui () const |
ShapeContainer & | getShapes () |
Get the scene geometry shape container. More... | |
const ShapeContainer & | getShapes () const |
GameObjectContainer & | getGameObjects () |
Get the scene level game object container. More... | |
const GameObjectContainer & | getGameObjects () const |
SpriteContainer & | getSprites () |
Get the scene level sprite container. More... | |
const SpriteContainer & | getSprites () const |
void | createPhysicsEngine (const Vector2f &gravity, const PhysIterations &iterations={3, 8}) |
Create a scene level physics simulation. More... | |
void | createGrid2D (unsigned int tileWidth, unsigned int tileHeight) |
Create the scene level grid instance. More... | |
void | init (Engine &engine) |
template<typename ... Args> | |
int | on_ (const std::string &event, Callback< Args... > callback) |
bool | unsubscribe_ (const std::string &event, int id) |
~Scene () override | |
Destructor. More... | |
void | setTag (const std::string &tag) |
Assign the object an alias. More... | |
const std::string & | getTag () const |
Get the tag assigned to the object. More... | |
unsigned int | getObjectId () const |
Get the unique id of the object. More... | |
virtual std::string | getClassType () const |
Get the name of the direct parent of an object instance. More... | |
int | onPropertyChange (const std::string &property, const Callback< Property > &callback, bool oneTime=false) |
Add an event listener to a specific property change event. More... | |
int | onPropertyChange (const Callback< Property > &callback, bool oneTime=false) |
Add an event listener to any property change event. More... | |
void | suspendedEventListener (int id, bool suspend) |
Pause or resume execution of an event listener. More... | |
bool | isEventListenerSuspended (int id) const |
Check if an event listener is suspended or not. More... | |
bool | removeEventListener (const std::string &event, int id) |
Remove an event listener from an event. More... | |
bool | removeEventListener (int id) |
Remove an event listener. More... | |
int | onDestruction (const Callback<> &callback) |
Add a destruction listener. More... | |
bool | isSameObjectAs (const Object &other) const |
Check if another object is the same instance as this object. More... | |
Static Public Member Functions | |
static Scene::Ptr | create () |
Create an empty scene. More... | |
Protected Member Functions | |
void | emitChange (const Property &property) |
Dispatch a property change event. More... | |
void | emitDestruction () |
Emit a destruction event. More... | |
Friends | |
class | priv::SceneManager |
Pre updates the scene. More... | |
A base class for game scenes.
A ime::Scene represents a distinct state of your game, for example loading, main menu, gameplay, paused and so on.
All game scenes exist in isolation and have no knowledge of each other. Only one scene can be active at a time. For example, the game cannot be in a main menu state and a gameplay state at the same time.
The transition between scenes is managed using the Last In First Out (LIFO) technique (The same way std::stack works). Therefore you cannot transition between scenes at random. The order in which scenes are added to the Engine is important.
For example, if while in the "gameplay" scene, you push a "pause" scene to the game engine, the "gameplay" scene will be paused (onPause called) and the "pause" scene will be entered (onEnter called on the pause scene instance) and the "pause" scene will become the active scene (gets system events, updates and rendered). If you pop the "pause" scene, the engine will destroy it (onExit called on the pause scene instance) and return to the "gameplay" scene (onResume called on the gameplay scene instance). However, if you push (transition to) another scene while in the "pause" scene, the process repeats; the "pause" scene gets paused and the the new scene becomes active)
Usage example:
using ime::Scene::Ptr = std::unique_ptr<Scene> |
ime::Scene::Scene | ( | ) |
Default Constructor.
|
delete |
Copy constructor.
|
noexcept |
Move constructor.
|
override |
Destructor.
|
static |
Create an empty scene.
void ime::Scene::createGrid2D | ( | unsigned int | tileWidth, |
unsigned int | tileHeight | ||
) |
Create the scene level grid instance.
tileWidth | The width of the grid |
tileHeight | The height of the grid |
Note that this function only creates a grid instance so that it can be used. You still need to construct the grid using the appropriate member function
void ime::Scene::createPhysicsEngine | ( | const Vector2f & | gravity, |
const PhysIterations & | iterations = {3, 8} |
||
) |
Create a scene level physics simulation.
gravity | Acceleration of bodies in the simulation due to gravity |
iterations | Position and velocity iterations (see ime::PhysIterations) |
|
protectedinherited |
Dispatch a property change event.
property | The property that changed |
This function will invoke all the event listeners of the specified property
|
protectedinherited |
Emit a destruction event.
audio::AudioManager & ime::Scene::getAudio | ( | ) |
Get the scene level audio manager.
The audio manager is local to the scene instance. All audio played by it is destroyed when the scene is destroyed
Scene * ime::Scene::getBackgroundScene | ( | ) |
Get the background scene of this scene.
PropertyContainer & ime::Scene::getCache | ( | ) |
Get the engine level cache.
AccessViolationException | If this function is called before the scene is initialized |
Data stored in the cache persists from scene to scene. This means that another scene can access or modify data stored by another scene. The data can also be accessed using ime::Engine::getCache
Camera & ime::Scene::getCamera | ( | ) |
Get the scene level camera.
AccessViolationException | If this function is called before the scene is initialized |
Note that this camera is the default/main camera and is always rendered last. You can add other cameras to the scene using getCameras()
CameraContainer & ime::Scene::getCameras | ( | ) |
Get the scene level camera container.
AccessViolationException | If this function is called before the scene is initialized |
|
overridevirtual |
Get the name of this class.
Implements ime::Object.
|
virtualinherited |
Get the name of the direct parent of an object instance.
In contrast to getClassName() which returns the name of the concrete class, this function returns the name of the concrete class's base class. This function is implemented by all derived classes of ime::Object which also serve as base classes. For classes whose direct parent is this class, this function will return the name of this class
Reimplemented in ime::audio::Audio, ime::GameObject, ime::GridMover, ime::Collider, ime::Joint, ime::Drawable, ime::Shape, and ime::SpriteImage.
Engine & ime::Scene::getEngine | ( | ) |
Get a reference to the game engine.
AccessViolationException | If this function is called before the scene is initialized |
Note that all scenes refer to the same Engine instance
EventEmitter & ime::Scene::getEventEmitter | ( | ) |
Get the scene level event EventEmitter.
The event emitter is local to the scene instance. This means that events registered on it are only dispatched when the scene is active and de-registered when the scene is destroyed.
GameObjectContainer & ime::Scene::getGameObjects | ( | ) |
Get the scene level game object container.
This class stores game objects that belong to this scene. All game objects in this container are automatically updated
EventDispatcher & ime::Scene::getGlobalEventEmitter | ( | ) |
Get the global event emitter.
The global event emitter is available to anything that needs it (a class, function etc...). Events registered to it are always dispatched regardless of the active scene. As a result you must remove event listeners that are local to the scene when the scene is destroyed. For example, a lambda that captures "this" will result in undefined behavior if not removed after the scene is destroyed
Grid2D & ime::Scene::getGrid | ( | ) |
Get the scene level grid.
AccessViolationException | If this function is called without creating the grid first |
Note that only one grid can be created per scene
GridMoverContainer & ime::Scene::getGridMovers | ( | ) |
Get the scene level GridMover container.
ui::GuiContainer & ime::Scene::getGui | ( | ) |
Get the scene level gui container.
AccessViolationException | If this function is called before the scene is initialized |
The gui container is local to the scene. This means that all widgets in it are destroyed when the scene is destroyed
input::InputManager & ime::Scene::getInput | ( | ) |
Get the scene level input manager.
The input manager is local to the scene instance. This means that input listeners registered on it are only invoked when the scene is active and de-registered when the scene is destroyed
|
inherited |
Get the unique id of the object.
Note that each instance of ime::Object has a unique id
Scene * ime::Scene::getParentScene | ( | ) |
Get the scene this scene is a background of.
The scene has a parent scene when it is set as the background of another scene. The scene it is set as the background of becomes its parent scene
By default, the scene does not have a parent scene
PhysicsEngine & ime::Scene::getPhysicsEngine | ( | ) |
Get the scene level physics engine/simulation.
AccessViolationException | If this function is called without creating the physics engine first |
The physics engine is responsible for creating, managing, colliding and updating all of the RigidBody's in it.
RenderLayerContainer & ime::Scene::getRenderLayers | ( | ) |
Get the scene render layers.
Render layers allow the scene to be rendered in separate layers which are then composed back together. By default the scene has a "default" layer at index 0. When a drawable object is added to the scene without an explicit layer, it will be added to the default layer. You can add objects to the "default" layer or even remove the "default" layer from the render layer container, however you mus not forget to reallocate the objects in the "default" layer to another layer, otherwise they will not be drawn to the screen
PrefContainer & ime::Scene::getSCache | ( | ) |
Get the engine level savable cache.
AccessViolationException | If this function is called before the scene is initialized |
Data stored in the cache persists from scene to scene. This means that another scene can access or modify data stored by another scene. Unlike ime::Scene::getCache, this cache can be initialized with data read from a file and can also be saved to a file. The data can also be accessed using ime::Engine::getSavableCache
ShapeContainer & ime::Scene::getShapes | ( | ) |
Get the scene geometry shape container.
You may use this class to create geometry shape instead of using their respective constructors. Consult the ShapeContainer class definition for more info
SpriteContainer & ime::Scene::getSprites | ( | ) |
Get the scene level sprite container.
This class stores the sprites in the scene. The sprite's animator will automatically be updated
|
inherited |
TimerManager & ime::Scene::getTimer | ( | ) |
Get the scene level timer manager.
The timer manager is local to the scene instance. This means that callbacks scheduled on it will only be dispatched when the scene is active
float ime::Scene::getTimescale | ( | ) | const |
Window & ime::Scene::getWindow | ( | ) |
Get the game window.
AccessViolationException | If this function is called before the scene is initialized |
Note that all scenes refer to the same game Window instance
bool ime::Scene::hasBackgroundScene | ( | ) | const |
Check if the scene has a background scene or not.
bool ime::Scene::isBackgroundScene | ( | ) | const |
Check if the scene is in a background scene.
The scene becomes a background scene when it is set as the background of another scene
By default, the scene is not a background scene
bool ime::Scene::isBackgroundSceneDrawable | ( | ) | const |
Check if the scenes background scene is rendered.
bool ime::Scene::isBackgroundSceneEventsEnabled | ( | ) | const |
Check if events are enabled for the background scene or not.
bool ime::Scene::isBackgroundSceneUpdateEnabled | ( | ) | const |
Check if the scenes background scene receives time updates or not.
bool ime::Scene::isCached | ( | ) | const |
bool ime::Scene::isEntered | ( | ) | const |
Check if the scene has been entered or not.
|
inherited |
Check if an event listener is suspended or not.
id | The identification number of the listener to be checked |
This function also returns false if the specified event listener does not exist
bool ime::Scene::isPaused | ( | ) | const |
|
inherited |
Check if another object is the same instance as this object.
other | The object to compare against this object |
bool ime::Scene::isVisibleOnPause | ( | ) | const |
Check if the scene is visible when paused.
|
inline |
|
inlinevirtual |
Handle a scene cache event.
This function is called by IME when this scene is cached. (see setCached() and ime::Engine::cacheScene)
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inherited |
Add a destruction listener.
callback | Function to be executed when the object is destroyed |
The destruction listener is called when the object reaches the end of its lifetime. Note that an object may have multiple destruction listeners registered to it
|
inlinevirtual |
Handle a scene enter.
This function is called once by IME when the scene is entered for the first time
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene exit event.
This function is called by IME when the scene is removed from the engine (either by destruction or by caching). See ime::Engine::popScene
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene frame-rate independent update.
deltaTime | The time passed since last update |
This function is called by IME every fixed frame-rate frame. It is called before onUpdate() and may be called once per frame, multiple times per frame or not called at all. The delta passed to it is always the same and is independent of the render fps. see ime::Engine::setPhysicsUpdateFrameRate to determine the delta
Note that implementing this function is optional and must be overridden if needed. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene frame begin event.
This function is called by IME when the current frame begins while this scene is active
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene frame end event.
This function is called by IME when the current frame ends and this scene is active
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene system event.
event | A system event to be handled |
This function is called by IME when a system event is triggered. It is called before the scene is updated and rendered.
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene initialization.
This function is called by IME when the base scene is ready to be used. It is called once after the constructor but before onEnter(). Note that ime::Scene functions cannot be called in the constructor, doing so is undefined behavior. Thus, this function is intended for situation where IME scene functions need to be accessed before the scene is entered.
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene pause event.
This function is called by IME if another scene is pushed over this scene while it was active (see ime::Engine::pushScene)
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene post-render event.
This function is called by IME once per frame after the scene is rendered.
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene post-update update.
deltaTime | The time passed since the last update |
This function is called by IME once per frame. It is called after onUpdate() and onFixedUpdate(). It may be useful if you want to do something after all normal updates have completed such as tracking the position of an object whose position may have changed in onFixedUpdate() or onUpdate().
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene pre-render event.
This function is called by IME once per frame before the scene is rendered
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene pre-update.
deltaTime | The time passed since the last update |
This function is called by IME before the scene is updated. This include physics, animations, timer updates etc. It is called before onUpdate() and onFixedUpdate()
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inherited |
Add an event listener to any property change event.
callback | The function to be executed when any property changes |
oneTime | True to execute the callback one-time or false to execute it every time the event is triggered |
When unsubscribing the any property change event handler, you must pass "propertyChange" as the name of the event
|
inherited |
Add an event listener to a specific property change event.
property | The name of the property to add an event listener to |
oneTime | True to execute the callback one-time or false to execute it every time the event is triggered |
callback | The function to be executed when the property changes |
A property change event is triggered by any function that begins with set, where the the text after set is the name of the property. For example, the setTag() function, modifies the tag property of the object, thus will generate a "tag" change event each time it is called
Note that multiple event listeners may be registered to the same property change event. In addition, when adding a property change event listener, the name of the property must be in lowercase.
|
inlinevirtual |
Handle a scene resume event.
This function is called by IME when this scene is resumed from a paused state. This occurs when a scene that was pushed over this scene is removed from the Engine (see ime::Engine::popScene)
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene 'resume from cache' event.
This function is called by IME when this scene is pushed to the Engine from the engines scene cache list (see ime::Engine::PushCachedScene)
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inlinevirtual |
Handle a scene frame-rate dependent update.
deltaTime | The time passed since the last update |
This function is called by IME once per frame. The delta passed to it is frame rate dependent. This means that it depends on how long the previous frame took to complete. Note that this function is called after onFixedUpdate()
All updates that should be synced with the render fps must be done in this function.
Note that implementing this function is optional. IME will never put anything inside this function, therefore you don't have to call the base class method in your implementation
|
inherited |
Remove an event listener from an event.
event | The name of the event to remove an event listener from |
id | The unique id of the event listener to be removed |
|
inherited |
Remove an event listener.
id | The id of the event listener to be removed |
void ime::Scene::setBackgroundScene | ( | Scene::Ptr | scene | ) |
Add a background scene to this scene.
scene | The scene to be the background of this scene |
AccessViolationException | If this function is called before this scene is initialized or entered. Furthermore, the exception is thrown if this scene is a background scene or the scene that is passed in is as an argument is already a background scene of another scene or it has a background scene |
Note that the scene manages the lifecycle of its background scene. That is, the background scene is destroyed when its parent scene is destroyed. Furthermore, a scene can only have one background scene at a time. Setting a new background scene destroys the previous scene. Pass nullptr to remove the background scene.
By default, the scene does not have a background scene
void ime::Scene::setBackgroundSceneDrawable | ( | bool | drawable | ) |
Set whether or not the scenes background scene is rendered.
drawable | True to render the background scene, otherwise false |
When the drawable argument is set to false, the background scene is not rendered when this scene is rendered and when it is set to true, the background scene is rendered behind this scene
By default, the background scene is rendered when the parent scene is rendered
void ime::Scene::setBackgroundSceneEventsEnable | ( | bool | enable | ) |
Enable or disable events for the scenes background scene.
enable | True to enable background scene events, otherwise false |
When events for a background scene are disabled, the background scene does not receive system updates such as input (keyboard, mouse, joystick etc), window events etc. Furthermore its onHandleEvent() function is not invoked
By default, background scene events are disabled
void ime::Scene::setBackgroundSceneUpdateEnable | ( | bool | enable | ) |
Set whether or not the scenes background scene receives time updates.
enable | True to enable background scene time updates, otherwise false |
When updates for a background scene is disabled, its onUpdate(), onFixedUpdate(), onPreUpdate() and onPostUpdate() functions are not invoked
By default, the background scene is updated
void ime::Scene::setCached | ( | bool | cache, |
const std::string & | alias = "" |
||
) |
Cache or uncahe the scene.
cache | True to cache or false to uncache |
alias | A unique name for identification during retrieval |
A cached scene is not destroyed when popped from the Engine but rather saved for reuse. For example, instead of instantiating a new pause menu scene every time the game is paused, you can cache the pause menu scene instance and return to it whenever the game is paused. This may improve performance.
Unlike ime::Engine::cacheScene, this function will cache the scene after it was active. To remove the scene from the cache simply call setCached(false)
By default the scene is not cached
|
inherited |
Assign the object an alias.
tag | The alias of the object |
This function is useful if you want to refer to the object by a tag instead of its object id. Unlike an object id, multiple objects may have the same tag
By default, the tag is an empty string
void ime::Scene::setTimescale | ( | float | timescale | ) |
Set the scene timescale factor.
timescale | The new scene timescale factor |
A timescale factor affects everything that requires a time update. This includes timers, animations, physics etc...
For example, if the timescale is set to 2.0f, then scene timers will count twice as fast, animations will play twice as fast, physics objects will move twice as fast etc..
By default the timescale is 1.0f (real-time)
void ime::Scene::setVisibleOnPause | ( | bool | visible | ) |
Set whether or not the scene is visible when it is paused.
visible | True to set visible, otherwise false |
By default, the scene is hidden when it is paused
|
inherited |
Pause or resume execution of an event listener.
id | The event listeners unique identification number |
suspend | True to suspend/pause or false to unsuspend/resume |
|
friend |