cocos2d-x 3.0
- 首页 - 相关页面 - 模块 - 命名空间 - - 文件 -
Public 成员函数 - 图1 Public 成员函数 - 图2)
- 类列表 - 类索引 - 类继承关系 - 类成员

全部)) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义)))

Public 成员函数 | 静态 Public 成员函数 | Public 属性 | Protected 属性 | 所有成员列表

ShakyTiles3D类 参考 Actions

ShakeTiels3D动作 更多…

#include

类 ShakyTiles3D 继承关系图:

Public 成员函数 - 图3 TiledGrid3DAction GridAction ActionInterval FiniteTimeAction Action Ref Clonable

## Public 成员函数
virtual ShakyTiles3D clone () const override
返回action的克隆对象 更多…
virtual void update (float time) override
每一帧都会调用这个方法,参数time是一个在0和1之间的值 更多…
- Public 成员函数 继承自 TiledGrid3DAction
Quad3 getTile (const Vec2 &position) const
返回网格(grid)中某个位置的格子(tile) NA NA 更多…
CC_DEPRECATED_ATTRIBUTE Quad3 tile (const Vec2 &position)
Quad3 getOriginalTile (const Vec2 &position) const
返回网格(grid)中某个位置的原始格子(tile)(未经过变换) NA NA 更多…
CC_DEPRECATED_ATTRIBUTE Quad3 originalTile (const Vec2 &position)
void setTile (const Vec2 &position, const Quad3 &coords)
设置网格(grid)中某个位置的格子 NA NA 更多…
virtual GridBase getGrid ()
返回网格(grid) 更多…
- Public 成员函数 继承自 GridAction
virtual GridAction reverse () const override
返回执行与本Action对象相反操作的新Action对象 更多…
virtual void startWithTarget (Node target) override
方法在action开始前调用, 操作会设置执行Action的目标对象为target. 更多…
- Public 成员函数 继承自 ActionInterval
float getElapsed (void)
从动作开始执行过去了多少秒 。 更多…
void setAmplitudeRate (float amp)
float getAmplitudeRate (void)
virtual bool isDone (void) const override
当action完成时返回true 更多…
virtual void step (float dt) override
这个方法每一帧都会被调用, 参数dt为两帧之间的时间间隔(单位秒). 除非你知道正在做什么否则不要重载这个方法. 更多…
- Public 成员函数 继承自 FiniteTimeAction
float getDuration () const
返回action的持续时间(单位:秒) 更多…
void setDuration (float duration)
设置action的持续时间(单位:秒) 更多…
- Public 成员函数 继承自 Action
virtual std::string description () const
NA NA 更多…
virtual void stop ()
方法在action完成之后调用,它将执行Action的target对象设置为nil. 更多…
Node getTarget () const
void setTarget (Node target)
这个方法更改action的target属性. 更多…
Node getOriginalTarget () const
void setOriginalTarget (Node originalTarget)
设置action的原始目标对象target, 当target为nil时setOriginalTarget设置的对象会运行这个action 除非你要像ActionManager类那样做一些很复杂的操作,否则不要调用这个方法 本方法只是对originalTarget的弱引用(assigned),没有进行retain操作。 更多…
int getTag () const
void setTag (int tag)
- Public 成员函数 继承自 Ref
void retain ()
保留所有权. 更多…
void release ()
立即释放所有权. 更多…
Ref autorelease ()
自动释放所有权在不久的将来. 更多…
unsigned int getReferenceCount () const
返回Ref对象当前的引用计数. 更多…
virtual ~Ref ()
NA NA 更多…
- Public 成员函数 继承自 Clonable
virtual ~Clonable ()
NA NA 更多…
CC_DEPRECATED_ATTRIBUTE Ref copy () const
返回Ref对象的一份拷贝. 更多…
## 静态 Public 成员函数
static ShakyTiles3D create (float duration, const Size &gridSize, int range, bool shakeZ)
根据抖动范围、Z顶点是否抖动、网格大小和持续时间创建ShakyTiles3D动作 更多…
- 静态 Public 成员函数 继承自 TiledGrid3DAction
static TiledGrid3DAction create (float duration, const Size &gridSize)
用大小和持续时间来创建动作 NA NA 更多…
## Public 属性
CC_CONSTRUCTOR_ACCESS pad0: ShakyTiles3D() {} virtual ~ShakyTiles3D() {} bool initWithDuration(float duration
CC_CONSTRUCTOR_ACCESS const Size & gridSize
CC_CONSTRUCTOR_ACCESS const Size int range
CC_CONSTRUCTOR_ACCESS const Size int bool shakeZ
## Protected 属性
int _randrange
bool _shakeZ
- Protected 属性 继承自 GridAction
Size _gridSize
NodeGrid _gridNodeTarget
- Protected 属性 继承自 ActionInterval
float _elapsed
bool _firstTick
- Protected 属性 继承自 FiniteTimeAction
float _duration
以秒单位的持续时间 更多…
- Protected 属性 继承自 Action
Node _originalTarget
Node * _target
action动作的执行目标target. 更多…
int _tag
action的tag属性. 更多…
- Protected 属性 继承自 Ref
unsigned int _referenceCount
引用计数 更多…
## 额外继承的成员函数
- 静态 Public 属性 继承自 Action
static const int INVALID_TAG = -1
所有Action对象的缺省tag值 更多…
- Protected 成员函数 继承自 GridAction
GridAction ()
virtual ~GridAction ()
bool initWithDuration (float duration, const Size &gridSize)
用大小和持续时间初始化动作 更多…
void cacheTargetAsGridNode ()
- Protected 成员函数 继承自 ActionInterval
bool initWithDuration (float d)
初始化动作 更多…
- Protected 成员函数 继承自 FiniteTimeAction
FiniteTimeAction ()
virtual ~FiniteTimeAction ()
- Protected 成员函数 继承自 Action
Action ()
virtual ~Action ()
- Protected 成员函数 继承自 Ref
Ref ()
构造函数 更多…

详细描述

ShakeTiels3D动作

成员函数说明

virtual ShakyTiles3D* clone ( ) const

overridevirtual

返回action的克隆对象

实现了 TiledGrid3DAction.

static ShakyTiles3D* create ( float duration,
const Size & gridSize,
int range,
bool shakeZ
)

static

根据抖动范围、Z顶点是否抖动、网格大小和持续时间创建ShakyTiles3D动作

virtual void update ( float time)

overridevirtual

每一帧都会调用这个方法,参数time是一个在0和1之间的值

time的含义举例:

  • 0 表示action刚刚开始
  • 0.5 表示action执行到正中间
  • 1 表示action已经执行完毕

重载 Action .

类成员变量说明

CC_CONSTRUCTOR_ACCESS pad0

int _randrange

protected

bool _shakeZ

protected

CC_CONSTRUCTOR_ACCESS const Size& gridSize

CC_CONSTRUCTOR_ACCESS const Size int range

CC_CONSTRUCTOR_ACCESS const Size int bool shakeZ

该类的文档由以下文件生成: