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

Moves a Node object by x,y pixels by modifying it's position attribute. More...

Inherits ActionInterval.

Inherited by MoveTo.

Public Member Functions

virtual MoveByclone () const override
 override ActionInterval.
 
virtual MoveByreverse (void) 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 MoveBycreate (float duration, const Vec2 &deltaPosition)
 Creates the action with duration and delta position. More...
 
var create ( var duration, var deltaPosition)
 Creates the action with duration and delta position. More...
 
local create ( local duration, local deltaPosition)
 Creates the action with duration and delta position. More...
 
static MoveBycreate (float duration, const Vec3 &deltaPosition)
 Creates the action with duration and 3d delta position. More...
 
var create ( var duration, var deltaPosition)
 Creates the action with duration and 3d delta position. More...
 
local create ( local duration, local deltaPosition)
 Creates the action with duration and 3d delta position. More...
 

Additional Inherited Members

- 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

Moves a Node object by x,y pixels by modifying it's position attribute.

x and y are relative to the position of the object. Several MoveBy actions can be concurrently called, and the resulting movement will be the sum of individual movements.

Member Function Documentation

static MoveBy* create ( float  duration,
const Vec2 deltaPosition 
)
static

Creates the action with duration and delta position.

Duration time, in seconds. The delta distance in 2d, it's a Vec2 type. An autoreleased MoveBy object.

var create ( var  duration,
var  deltaPosition 
)
static

Creates the action with duration and delta position.

Duration time, in seconds. The delta distance in 2d, it's a Vec2 type. An autoreleased MoveBy object.

local create ( local  duration,
local  deltaPosition 
)
static

Creates the action with duration and delta position.

Duration time, in seconds. The delta distance in 2d, it's a Vec2 type. An autoreleased MoveBy object.

static MoveBy* create ( float  duration,
const Vec3 deltaPosition 
)
static

Creates the action with duration and 3d delta position.

Duration time, in seconds. The delta distance in 3d, it's a Vec3 type. An autoreleased MoveBy object.

var create ( var  duration,
var  deltaPosition 
)
static

Creates the action with duration and 3d delta position.

Duration time, in seconds. The delta distance in 3d, it's a Vec3 type. An autoreleased MoveBy object.

local create ( local  duration,
local  deltaPosition 
)
static

Creates the action with duration and 3d delta position.

Duration time, in seconds. The delta distance in 3d, it's a Vec3 type. An autoreleased MoveBy object.


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