Axmol 3.0.0-89d6d9a
Loading...
Searching...
No Matches
TransitionScene Class Reference

Base class for Transition scenes. More...

#include <Transition.h>

Inherited by TransitionCrossFade, TransitionFade, TransitionFadeTR, TransitionJumpZoom, TransitionMoveInL, TransitionPageTurn, TransitionProgress, TransitionRotoZoom, TransitionSceneOriented, TransitionShrinkGrow, TransitionSlideInL, TransitionSplitCols, and TransitionTurnOffTiles.

Public Types

enum class  Orientation { LEFT_OVER = 0 , RIGHT_OVER = 1 , UP_OVER = 0 , DOWN_OVER = 1 }
 Orientation Type used by some transitions. More...

Public Member Functions

void finish ()
 Called after a transition finishes.
void hideOutShowIn ()
 Used by some transitions to hide the outer scene.
void draw (const SceneRenderState &state, const Mat4 &transform, uint32_t flags) override
 Override this method to draw your own node.
void onEnter () override
 Event callback that is invoked every time when Node enters the 'stage'.
void onExit () override
 Event callback that is invoked every time the Node leaves the 'stage'.
void cleanup () override
 Stops all running actions and schedulers.
bool initWithDuration (float t, Scene *scene)
 initializes a transition with duration and incoming scene

Static Public Member Functions

static TransitionScene * create (float t, Scene *scene)
 Creates a base transition with duration and incoming scene.

Detailed Description

Base class for Transition scenes.

Member Enumeration Documentation

◆ Orientation

enum class Orientation
strong

Orientation Type used by some transitions.

Enumerator
LEFT_OVER 

An horizontal orientation where the Left is nearer.

RIGHT_OVER 

An horizontal orientation where the Right is nearer.

UP_OVER 

A vertical orientation where the Up is nearer.

DOWN_OVER 

A vertical orientation where the Bottom is nearer.

Member Function Documentation

◆ create()

TransitionScene * create ( float t,
Scene * scene )
static

Creates a base transition with duration and incoming scene.

Parameters
tDuration time, in seconds.
sceneA given scene.
Returns
A autoreleased TransitionScene object.

◆ draw()

void draw ( const SceneRenderState & state,
const Mat4 & transform,
uint32_t flags )
overridevirtual

Override this method to draw your own node.

The following GL states will be enabled by default:

  • glEnableClientState(GL_VERTEX_ARRAY);
  • glEnableClientState(GL_COLOR_ARRAY);
  • glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  • glEnable(GL_TEXTURE_2D); AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE But if you enable any other GL state, you should disable it after drawing your node.
Parameters
stateA scene render traversal state.
transformA transform matrix.
flagsRenderer flag.

Reimplemented from Node.

Reimplemented in TransitionSplitCols, and TransitionTurnOffTiles.

◆ onEnter()

void onEnter ( )
overridevirtual

Event callback that is invoked every time when Node enters the 'stage'.

If the Node enters the 'stage' with a transition, this event is called when the transition starts. During onEnter you can't access a "sister/brother" node. If you override onEnter, you shall call its parent's one, e.g., Node::onEnter(). @lua NA

Reimplemented from Node.

Reimplemented in TransitionShrinkGrow, TransitionSlideInL, TransitionSplitCols, TransitionTurnOffTiles, TransitionZoomFlipAngular, TransitionZoomFlipX, and TransitionZoomFlipY.

◆ onExit()

void onExit ( )
overridevirtual

Event callback that is invoked every time the Node leaves the 'stage'.

If the Node leaves the 'stage' with a transition, this event is called when the transition finishes. During onExit you can't access a sibling node. If you override onExit, you shall call its parent's one, e.g., Node::onExit(). @lua NA

Reimplemented from Node.

Reimplemented in TransitionSplitCols, and TransitionTurnOffTiles.


The documentation for this class was generated from the following file:
  • Transition.h