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

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

#include <ActionInterval.h>

Inherits ActionInterval.

Inherited by MoveTo.

Public Member Functions

void update (float time) override
bool initWithDuration (float duration, const Vec2 &deltaPosition)
 initializes the action
Public Member Functions inherited from ActionInterval
float getElapsed ()
 How many seconds had elapsed since the actions started to run.
void setAmplitudeRate (float amp)
 Sets the amplitude rate, extension in GridAction.
float getAmplitudeRate ()
 Gets the amplitude rate, extension in GridAction.
void step (float dt) override
bool initWithDuration (float d)
 initializes the action

Static Public Member Functions

static MoveBy * create (float duration, const Vec2 &deltaPosition)
 Creates the action.
static MoveBy * create (float duration, const Vec3 &deltaPosition)
 Creates the action.

Detailed Description

Moves a Node object 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.

Since
v2.1beta2-custom

Member Function Documentation

◆ create() [1/2]

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

Creates the action.

Parameters
durationDuration time, in seconds.
deltaPositionThe delta distance in 2d, it's a Vec2 type.
Returns
An autoreleased MoveBy object.

◆ create() [2/2]

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

Creates the action.

Parameters
durationDuration time, in seconds.
deltaPositionThe delta distance in 3d, it's a Vec3 type.
Returns
An autoreleased MoveBy object.

◆ update()

void update ( float time)
override
Parameters
timein seconds

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