Cocos2d-x  v3.12
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
RotateTo Class Reference

Rotates a Node object to a certain angle by modifying it's rotation attribute. More...

Inherits ActionInterval.

Public Member Functions

virtual RotateToclone () const override
 override Action.
 
virtual RotateToreverse () const override
 override Action.
 
local reverse ()
 override Action.
 
- Public Member Functions inherited from ActionInterval
float getElapsed (void)
 How many seconds had elapsed since the actions started to run. More...
 
var getElapsed ()
 How many seconds had elapsed since the actions started to run. More...
 
local getElapsed ()
 How many seconds had elapsed since the actions started to run. More...
 
void setAmplitudeRate (float amp)
 Sets the amplitude rate, extension in GridAction. More...
 
float getAmplitudeRate (void)
 Gets the ampliture rate, extension in GridAction. More...
 
virtual bool isDone (void) const override
 override Action.
 
local isDone ()
 override Action.
 

Static Public Member Functions

static RotateTocreate (float duration, float dstAngleX, float dstAngleY)
 Creates the action with duration and separate rotation angles. More...
 
var create ( var duration, var dstAngleX, var dstAngleY)
 Creates the action with duration and separate rotation angles. More...
 
local create ( local duration, local dstAngleX, local dstAngleY)
 Creates the action with duration and separate rotation angles. More...
 
static RotateTocreate (float duration, float dstAngle)
 Creates the action with duration and destination angle. More...
 
local create ( local duration, local dstAngle)
 Creates the action with duration and destination angle. More...
 
static RotateTocreate (float duration, const Vec3 &dstAngle3D)
 Creates the action with 3D rotation angles. More...
 
var create ( var duration, var dstAngle3D)
 Creates the action with 3D rotation angles. More...
 

Protected Member Functions

bool initWithDuration (float duration, float dstAngleX, float dstAngleY)
 initializes the action Duration in seconds Destination angle x in degrees. More...
 
var initWithDuration ( var duration, var dstAngleX, var dstAngleY)
 initializes the action Duration in seconds Destination angle x in degrees. More...
 
local initWithDuration ( local duration, local dstAngleX, local dstAngleY)
 initializes the action Duration in seconds Destination angle x in degrees. More...
 
bool initWithDuration (float duration, const Vec3 &dstAngle3D)
 initializes the action Duration in seconds A Vec3 angle. More...
 
void calculateAngles (float &startAngle, float &diffAngle, float dstAngle)
 Calculates the start and diff angles Start angle in degrees Angle difference between start angle and destination angle in degrees Destination angle in degrees.
 
- Protected Member Functions inherited from ActionInterval
bool initWithDuration (float d)
 initializes the action with the duration. More...
 
var initWithDuration ( var d)
 initializes the action with the duration. More...
 
local initWithDuration ( local d)
 initializes the action with the duration. More...
 

Detailed Description

Rotates a Node object to a certain angle by modifying it's rotation attribute.

The direction will be decided by the shortest angle.

Member Function Documentation

static RotateTo* create ( float  duration,
float  dstAngleX,
float  dstAngleY 
)
static

Creates the action with duration and separate rotation angles.

Duration time, in seconds. Destination angle x in degrees. Destination angle y in degrees. An autoreleased RotateTo object.

var create ( var  duration,
var  dstAngleX,
var  dstAngleY 
)
static

Creates the action with duration and separate rotation angles.

Duration time, in seconds. Destination angle x in degrees. Destination angle y in degrees. An autoreleased RotateTo object.

local create ( local  duration,
local  dstAngleX,
local  dstAngleY 
)
static

Creates the action with duration and separate rotation angles.

Duration time, in seconds. Destination angle x in degrees. Destination angle y in degrees. An autoreleased RotateTo object.

static RotateTo* create ( float  duration,
float  dstAngle 
)
static

Creates the action with duration and destination angle.

Duration time, in seconds. Destination angle in degrees. An autoreleased RotateTo object.

var create ( var  duration,
var  dstAngle 
)
static

Creates the action with duration and destination angle.

Duration time, in seconds. Destination angle in degrees. An autoreleased RotateTo object.

local create ( local  duration,
local  dstAngle 
)
static

Creates the action with duration and destination angle.

Duration time, in seconds. Destination angle in degrees. An autoreleased RotateTo object.

static RotateTo* create ( float  duration,
const Vec3 dstAngle3D 
)
static

Creates the action with 3D rotation angles.

Duration time, in seconds. A Vec3 angle. An autoreleased RotateTo object.

var create ( var  duration,
var  dstAngle3D 
)
static

Creates the action with 3D rotation angles.

Duration time, in seconds. A Vec3 angle. An autoreleased RotateTo object.

local create ( local  duration,
local  dstAngle3D 
)
static

Creates the action with 3D rotation angles.

Duration time, in seconds. A Vec3 angle. An autoreleased RotateTo object.

bool initWithDuration ( float  duration,
float  dstAngleX,
float  dstAngleY 
)
protected

initializes the action Duration in seconds Destination angle x in degrees.

Destination angle y in degrees. Return true if initialized successfully, otherwise return false.

var initWithDuration ( var  duration,
var  dstAngleX,
var  dstAngleY 
)
protected

initializes the action Duration in seconds Destination angle x in degrees.

Destination angle y in degrees. Return true if initialized successfully, otherwise return false.

local initWithDuration ( local  duration,
local  dstAngleX,
local  dstAngleY 
)
protected

initializes the action Duration in seconds Destination angle x in degrees.

Destination angle y in degrees. Return true if initialized successfully, otherwise return false.

bool initWithDuration ( float  duration,
const Vec3 dstAngle3D 
)
protected

initializes the action Duration in seconds A Vec3 angle.

Return true if initialized successfully, otherwise return false.

var initWithDuration ( var  duration,
var  dstAngle3D 
)
protected

initializes the action Duration in seconds A Vec3 angle.

Return true if initialized successfully, otherwise return false.

local initWithDuration ( local  duration,
local  dstAngle3D 
)
protected

initializes the action Duration in seconds A Vec3 angle.

Return true if initialized successfully, otherwise return false.


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