PGE Engine
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Scene Class Reference
Inheritance diagram for Scene:
CreditsScene GameOverScene LevelScene LoadingScene TitleScene WorldScene

Public Types

enum  TypeOfScene {
  _Unknown =0, Loading, Title, Level,
  World, Credits, GameOver
}
 
typedef QList< Scene_EffectSceneEffectsArray
 

Public Member Functions

void updateTickValue ()
 
 Scene (TypeOfScene _type)
 
virtual void onKeyInput (int key)
 Triggering when pressed game specific key.
 
virtual void onKeyboardPressed (SDL_Scancode scancode)
 Triggering when pressed any key on keyboard.
 
virtual void onKeyboardPressedSDL (SDL_Keycode sdl_key, Uint16 modifier)
 Triggering when pressed any key on keyboard.
 
virtual void onKeyboardReleased (SDL_Scancode scancode)
 Triggering when pressed any key on keyboard.
 
virtual void onKeyboardReleasedSDL (SDL_Keycode sdl_key, Uint16 modifier)
 Triggering when pressed any key on keyboard.
 
virtual void onMouseMoved (SDL_MouseMotionEvent &mmevent)
 
virtual void onMousePressed (SDL_MouseButtonEvent &mbevent)
 
virtual void onMouseReleased (SDL_MouseButtonEvent &mbevent)
 
virtual void onMouseWheel (SDL_MouseWheelEvent &wheelevent)
 
virtual void processEvents ()
 
virtual LuaEnginegetLuaEngine ()
 
virtual void update ()
 
virtual void updateLua ()
 
virtual void render ()
 
virtual void renderMouse ()
 
virtual int exec ()
 
TypeOfScene type ()
 
void addRenderFunction (const std::function< void()> &renderFunc)
 
void clearRenderFunctions ()
 
virtual bool isVizibleOnScreen (PGE_RectF &rect)
 
virtual bool isVizibleOnScreen (double x, double y, double w, double h)
 
bool isExiting ()
 
bool doShutDown ()
 
bool isOpacityFadding ()
 
void setFade (int speed, float target, float step)
 
void launchStaticEffect (long effectID, float startX, float startY, int animationLoops, int delay, float velocityX, float velocityY, float gravity, int direction=0, Scene_Effect_Phys phys=Scene_Effect_Phys())
 launchStaticEffect Starts static effect by ID at position X,Y relative to left-top corner of effect picture More...
 
void launchStaticEffectC (long effectID, float startX, float startY, int animationLoops, int delay, float velocityX, float velocityY, float gravity, int direction=0, Scene_Effect_Phys phys=Scene_Effect_Phys())
 launchStaticEffectC Starts static effect by ID at position X,Y relative to center of effect picture More...
 
void processEffects (float ticks)
 
QString errorString ()
 

Public Attributes

PGE_Fader fader
 
SceneEffectsArray WorkingEffects
 

Protected Types

typedef
std::chrono::high_resolution_clock 
StClock
 
typedef
std::chrono::high_resolution_clock::time_point 
StTimePt
 

Protected Member Functions

void wait (float ms)
 

Protected Attributes

bool running
 
bool _doShutDown
 
bool doExit
 
int uTick
 
float uTickf
 
QString _errorString
 

Member Function Documentation

void Scene::launchStaticEffect ( long  effectID,
float  startX,
float  startY,
int  animationLoops,
int  delay,
float  velocityX,
float  velocityY,
float  gravity,
int  direction = 0,
Scene_Effect_Phys  phys = Scene_Effect_Phys() 
)

launchStaticEffect Starts static effect by ID at position X,Y relative to left-top corner of effect picture

Parameters
effectIDID of effect from lvl_effects.ini
startXX position relative to left side of effect picture
startYY position relative to top side of effect picture
animationLoopsNumber of loops before effect will be finished. 0 - unlimited while time is not exited
delaymax time of effect working. 0 - unlimited while loops are not exited or while effect still vizible of screen.
velocityXHorizontal motion speed (pixels per 1/65 second [independent to framerate])
velocityYVertical motion speed (pixels per 1/65 second [independent to framerate])
gravityY-gravitation will cause falling of effect picture
physAdditional physical settings
void Scene::launchStaticEffectC ( long  effectID,
float  startX,
float  startY,
int  animationLoops,
int  delay,
float  velocityX,
float  velocityY,
float  gravity,
int  direction = 0,
Scene_Effect_Phys  phys = Scene_Effect_Phys() 
)

launchStaticEffectC Starts static effect by ID at position X,Y relative to center of effect picture

Parameters
effectIDID of effect from lvl_effects.ini
startXX position relative to center of effect picture
startYY position relative to center of effect picture
animationLoopsNumber of loops before effect will be finished. 0 - unlimited while time is not exited
delaymax time of effect working. 0 - unlimited while loops are not exited or while effect still vizible of screen.
velocityXHorizontal motion speed (pixels per 1/65 second [independent to framerate])
velocityYVertical motion speed (pixels per 1/65 second [independent to framerate])
gravityY-gravitation will cause falling of effect picture
physAdditional physical settings

The documentation for this class was generated from the following files: