@ More...
Namespaces | |
cocos2d | |
cocos2d::ui | |
Classes | |
class | AsyncTaskPool |
This class allows to perform background operations without having to manipulate threads. More... | |
class | AsyncTaskPool::ThreadTasks |
class | Configuration |
Configuration contains some openGL variables. More... | |
class | Controller |
A Controller object represents a connected physical game controller. More... | |
struct | KeyStatus |
class | Director |
Class that creates and handles the main Window and manages how and when to execute the Scenes. More... | |
class | Event |
Base class of all kinds of events. More... | |
class | EventAcceleration |
Accelerometer event. More... | |
class | EventCustom |
Custom event. More... | |
class | EventDispatcher |
This class manages event listener subscriptions and event dispatching. More... | |
class | EventDispatcher::EventListenerVector |
The vector to store event listeners with scene graph based priority and fixed priority. More... | |
class | EventFocus |
Focus event. More... | |
class | EventKeyboard |
Keyboard event. More... | |
class | EventListener |
The base class of event listener. More... | |
class | EventListenerAcceleration |
Acceleration event listener. More... | |
class | EventListenerController |
class | EventListenerCustom |
Custom event listener. More... | |
class | EventListenerFocus |
Focus event listener. More... | |
class | EventListenerKeyboard |
Keyboard event listener. More... | |
class | EventListenerMouse |
Mouse event listener. More... | |
class | EventListenerTouchOneByOne |
Single touch event listener. More... | |
class | EventListenerTouchAllAtOnce |
Multiple touches event listener. More... | |
class | EventMouse |
The mouse event. More... | |
class | EventTouch |
Touch event. More... | |
struct | IMEKeyboardNotificationInfo |
Keyboard notification event type. More... | |
class | IMEDelegate |
Input method editor delegate. More... | |
class | IMEDispatcher |
Input Method Edit Message Dispatcher. More... | |
class | Map< K, V > |
Similar to std::unordered_map, but it will manage reference count automatically internally. More... | |
class | RandomHelper |
A helper class for creating random number. More... | |
class | Clonable |
Interface that defines how to clone an Ref. More... | |
class | Ref |
Ref is used for reference count manangement. More... | |
class | Scheduler |
Scheduler is responsible for triggering the scheduled callbacks. More... | |
struct | Color3B |
RGB color composed of bytes 3 bytes. More... | |
struct | Color4B |
RGBA color composed of 4 bytes. More... | |
struct | Color4F |
RGBA color composed of 4 floats. More... | |
struct | Tex2F |
A vertex composed of 2 floats: x, y. More... | |
struct | PointSprite |
Vec2 Sprite component. More... | |
struct | Quad2 |
A 2D Quad. More... | |
struct | Quad3 |
A 3D Quad. More... | |
struct | V2F_C4B_T2F |
A Vec2 with a vertex point, a tex coord point and a color 4B. More... | |
struct | V2F_C4B_PF |
struct | V2F_C4F_T2F |
A Vec2 with a vertex point, a tex coord point and a color 4F. More... | |
struct | V3F_C4B_T2F |
A Vec2 with a vertex point, a tex coord point and a color 4B. More... | |
struct | V3F_T2F |
A Vec2 with a vertex point, a tex coord point. More... | |
struct | V2F_C4B_T2F_Triangle |
A Triangle of V2F_C4B_T2F. More... | |
struct | V2F_C4B_T2F_Quad |
A Quad of V2F_C4B_T2F. More... | |
struct | V3F_C4B_T2F_Quad |
4 Vertex3FTex2FColor4B. More... | |
struct | V2F_C4F_T2F_Quad |
4 Vertex2FTex2FColor4F Quad. More... | |
struct | V3F_T2F_Quad |
struct | BlendFunc |
Blend Function used for textures. More... | |
struct | T2F_Quad |
Texture coordinates for a quad. More... | |
struct | AnimationFrameData |
Struct that holds the size in pixels, texture coordinates and delays for animated ParticleSystemQuad. More... | |
struct | FontShadow |
types used for defining fonts properties (i.e. More... | |
struct | FontStroke |
Stroke attributes. More... | |
struct | FontDefinition |
Font attributes. More... | |
struct | Acceleration |
The device accelerometer reports values for each axis in units of g-force. More... | |
class | UserDefault |
UserDefault acts as a tiny database. More... | |
Macros | |
#define | CC_CALLFUNC_SELECTOR(_SELECTOR) static_cast<cocos2d::SEL_CallFunc>(&_SELECTOR) |
#define | CC_CALLFUNCN_SELECTOR(_SELECTOR) static_cast<cocos2d::SEL_CallFuncN>(&_SELECTOR) |
#define | CC_CALLFUNCND_SELECTOR(_SELECTOR) static_cast<cocos2d::SEL_CallFuncND>(&_SELECTOR) |
#define | CC_CALLFUNCO_SELECTOR(_SELECTOR) static_cast<cocos2d::SEL_CallFuncO>(&_SELECTOR) |
#define | CC_MENU_SELECTOR(_SELECTOR) static_cast<cocos2d::SEL_MenuHandler>(&_SELECTOR) |
#define | CC_SCHEDULE_SELECTOR(_SELECTOR) static_cast<cocos2d::SEL_SCHEDULE>(&_SELECTOR) |
#define | callfunc_selector(_SELECTOR) CC_CALLFUNC_SELECTOR(_SELECTOR) |
#define | callfuncN_selector(_SELECTOR) CC_CALLFUNCN_SELECTOR(_SELECTOR) |
#define | callfuncND_selector(_SELECTOR) CC_CALLFUNCND_SELECTOR(_SELECTOR) |
#define | callfuncO_selector(_SELECTOR) CC_CALLFUNCO_SELECTOR(_SELECTOR) |
#define | menu_selector(_SELECTOR) CC_MENU_SELECTOR(_SELECTOR) |
#define | schedule_selector(_SELECTOR) CC_SCHEDULE_SELECTOR(_SELECTOR) |
Typedefs | |
typedef void(Ref::* | SEL_CallFunc )() |
typedef void(Ref::* | SEL_CallFuncN )(Node *) |
typedef void(Ref::* | SEL_CallFuncND )(Node *, void *) |
typedef void(Ref::* | SEL_CallFuncO )(Ref *) |
typedef void(Ref::* | SEL_MenuHandler )(Ref *) |
typedef void(Ref::* | SEL_SCHEDULE )(float) |
Functions | |
template<typename T > | |
T | (T min, T max) |
Returns a random value between min and max . More... | |
template<typename T > | |
var | ( var min, var max) |
Returns a random value between min and max . More... | |
template<typename T > | |
local | ( local min, local max) |
Returns a random value between min and max . More... | |
template<> | |
float | (float min, float max) |
template<> | |
local | ( local min, local max) |
template<> | |
long double | (long double min, long double max) |
template<> | |
var | ( var min, var max) |
template<> | |
local | ( local min, local max) |
template<> | |
double | (double min, double max) |
template<> | |
var | ( var min, var max) |
template<> | |
local | ( local min, local max) |
int | () |
Returns a random int between 0 and RAND_MAX. More... | |
void | stopTasks (TaskType type) |
Stop tasks. More... | |
var | stopTasks ( var type) |
Stop tasks. More... | |
local | stopTasks ( local type) |
Stop tasks. More... | |
template<class F > | |
void | enqueue (TaskType type, const TaskCallBack &callback, void *callbackParam, F &&f) |
Enqueue a asynchronous task. More... | |
template<class F > | |
var | enqueue ( var type, var callback, var callbackParam, var f) |
Enqueue a asynchronous task. More... | |
template<class F > | |
local | enqueue ( local type, local callback, local callbackParam, local f) |
Enqueue a asynchronous task. More... | |
Variables | |
const std::string CC_DLL | STD_STRING_EMPTY |
A static global empty std::string install. More... | |
@
Similar to std::vector, but it will manage reference count automatically internally.
This class is provide as a wrapper of basic types, such as int and bool.
Which means it will invoke Ref::retain() when adding an element, and invoke Ref::release() when removing an element. The element should be Ref
or its sub-class.
#define callfunc_selector | ( | _SELECTOR | ) | CC_CALLFUNC_SELECTOR(_SELECTOR) |
var callfunc_selector | ( | var | ) | CC_CALLFUNC_SELECTOR(_SELECTOR) |
local callfunc_selector | ( | local | ) | CC_CALLFUNC_SELECTOR(_SELECTOR) |
#define callfuncN_selector | ( | _SELECTOR | ) | CC_CALLFUNCN_SELECTOR(_SELECTOR) |
#define callfuncND_selector | ( | _SELECTOR | ) | CC_CALLFUNCND_SELECTOR(_SELECTOR) |
var callfuncND_selector | ( | var | ) | CC_CALLFUNCND_SELECTOR(_SELECTOR) |
local callfuncND_selector | ( | local | ) | CC_CALLFUNCND_SELECTOR(_SELECTOR) |
#define callfuncO_selector | ( | _SELECTOR | ) | CC_CALLFUNCO_SELECTOR(_SELECTOR) |
var callfuncO_selector | ( | var | ) | CC_CALLFUNCO_SELECTOR(_SELECTOR) |
local callfuncO_selector | ( | local | ) | CC_CALLFUNCO_SELECTOR(_SELECTOR) |
#define CC_CALLFUNC_SELECTOR | ( | _SELECTOR | ) | static_cast<cocos2d::SEL_CallFunc>(&_SELECTOR) |
var CC_CALLFUNC_SELECTOR | ( | var | ) | static_cast<cocos2d::SEL_CallFunc>(&_SELECTOR) |
local CC_CALLFUNC_SELECTOR | ( | local | ) | static_cast<cocos2d::SEL_CallFunc>(&_SELECTOR) |
#define CC_CALLFUNCN_SELECTOR | ( | _SELECTOR | ) | static_cast<cocos2d::SEL_CallFuncN>(&_SELECTOR) |
var CC_CALLFUNCN_SELECTOR | ( | var | ) | static_cast<cocos2d::SEL_CallFuncN>(&_SELECTOR) |
local CC_CALLFUNCN_SELECTOR | ( | local | ) | static_cast<cocos2d::SEL_CallFuncN>(&_SELECTOR) |
#define CC_CALLFUNCND_SELECTOR | ( | _SELECTOR | ) | static_cast<cocos2d::SEL_CallFuncND>(&_SELECTOR) |
var CC_CALLFUNCND_SELECTOR | ( | var | ) | static_cast<cocos2d::SEL_CallFuncND>(&_SELECTOR) |
#define CC_CALLFUNCO_SELECTOR | ( | _SELECTOR | ) | static_cast<cocos2d::SEL_CallFuncO>(&_SELECTOR) |
#define CC_MENU_SELECTOR | ( | _SELECTOR | ) | static_cast<cocos2d::SEL_MenuHandler>(&_SELECTOR) |
#define CC_SCHEDULE_SELECTOR | ( | _SELECTOR | ) | static_cast<cocos2d::SEL_SCHEDULE>(&_SELECTOR) |
var CC_SCHEDULE_SELECTOR | ( | var | ) | static_cast<cocos2d::SEL_SCHEDULE>(&_SELECTOR) |
local CC_SCHEDULE_SELECTOR | ( | local | ) | static_cast<cocos2d::SEL_SCHEDULE>(&_SELECTOR) |
#define menu_selector | ( | _SELECTOR | ) | CC_MENU_SELECTOR(_SELECTOR) |
var menu_selector | ( | var | ) | CC_MENU_SELECTOR(_SELECTOR) |
local menu_selector | ( | local | ) | CC_MENU_SELECTOR(_SELECTOR) |
#define schedule_selector | ( | _SELECTOR | ) | CC_SCHEDULE_SELECTOR(_SELECTOR) |
var schedule_selector | ( | var | ) | CC_SCHEDULE_SELECTOR(_SELECTOR) |
local schedule_selector | ( | local | ) | CC_SCHEDULE_SELECTOR(_SELECTOR) |
typedef void(Ref::* SEL_CallFunc)() |
typedef void(Ref::* SEL_CallFunc)() |
typedef void(Ref::* SEL_CallFunc)() |
typedef void(Ref::* SEL_CallFuncN)(Node *) |
typedef void(Ref::* SEL_CallFuncN)(Node *) |
typedef void(Ref::* SEL_CallFuncN)(Node *) |
typedef void(Ref::* SEL_CallFuncND)(Node *, void *) |
typedef void(Ref::* SEL_CallFuncND)(Node *, void *) |
typedef void(Ref::* SEL_CallFuncND)(Node *, void *) |
typedef void(Ref::* SEL_CallFuncO)(Ref *) |
typedef void(Ref::* SEL_CallFuncO)(Ref *) |
typedef void(Ref::* SEL_CallFuncO)(Ref *) |
typedef void(Ref::* SEL_MenuHandler)(Ref *) |
typedef void(Ref::* SEL_MenuHandler)(Ref *) |
typedef void(Ref::* SEL_MenuHandler)(Ref *) |
typedef void(Ref::* SEL_SCHEDULE)(float) |
typedef void(Ref::* SEL_SCHEDULE)(float) |
typedef void(Ref::* SEL_SCHEDULE)(float) |
|
strongprotected |
|
strongprotected |
|
strongprotected |
|
strong |
EventCode Touch event code.
Enumerator | |
---|---|
BEGAN | |
MOVED | |
ENDED | |
CANCELLED |
|
strong |
EventCode Touch event code.
Enumerator | |
---|---|
BEGAN | |
MOVED | |
ENDED | |
CANCELLED |
|
strong |
EventCode Touch event code.
Enumerator | |
---|---|
BEGAN | |
MOVED | |
ENDED | |
CANCELLED |
enum Key |
Controllers' standard key Controller receives only standard key which contained within enum Key by default.
var Key |
Controllers' standard key Controller receives only standard key which contained within enum Key by default.
local Key |
Controllers' standard key Controller receives only standard key which contained within enum Key by default.
|
strong |
KeyCode The key (code).
|
strong |
KeyCode The key (code).
|
strong |
KeyCode The key (code).
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Type Event type.
Enumerator | |
---|---|
TOUCH | |
KEYBOARD | |
ACCELERATION | |
MOUSE | |
FOCUS | |
GAME_CONTROLLER | |
CUSTOM |
|
strong |
Type Event type.
Enumerator | |
---|---|
TOUCH | |
KEYBOARD | |
ACCELERATION | |
MOUSE | |
FOCUS | |
GAME_CONTROLLER | |
CUSTOM |
|
strong |
Type Event type.
Enumerator | |
---|---|
TOUCH | |
KEYBOARD | |
ACCELERATION | |
MOUSE | |
FOCUS | |
GAME_CONTROLLER | |
CUSTOM |
|
strong |
Type Event type.
Enumerator | |
---|---|
UNKNOWN | |
TOUCH_ONE_BY_ONE | |
TOUCH_ALL_AT_ONCE | |
KEYBOARD | |
MOUSE | |
ACCELERATION | |
FOCUS | |
GAME_CONTROLLER | |
CUSTOM |
|
strong |
Type Event type.
Enumerator | |
---|---|
UNKNOWN | |
TOUCH_ONE_BY_ONE | |
TOUCH_ALL_AT_ONCE | |
KEYBOARD | |
MOUSE | |
ACCELERATION | |
FOCUS | |
GAME_CONTROLLER | |
CUSTOM |
|
strong |
Type Event type.
Enumerator | |
---|---|
UNKNOWN | |
TOUCH_ONE_BY_ONE | |
TOUCH_ALL_AT_ONCE | |
KEYBOARD | |
MOUSE | |
ACCELERATION | |
FOCUS | |
GAME_CONTROLLER | |
CUSTOM |
|
inline |
Returns a random value between min
and max
.
|
inline |
Returns a random value between min
and max
.
|
inline |
Returns a random value between min
and max
.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns a random int between 0 and RAND_MAX.
|
inline |
Returns a random int between 0 and RAND_MAX.
|
inline |
Returns a random int between 0 and RAND_MAX.
|
inline |
Enqueue a asynchronous task.
type | task type is io task, network task or others, each type of task has a thread to deal with it. |
callback | callback when the task is finished. The callback is called in the main thread instead of task thread. |
callbackParam | parameter used by the callback. |
f | task can be lambda function. |
args | task parameters. |
|
inline |
Enqueue a asynchronous task.
type | task type is io task, network task or others, each type of task has a thread to deal with it. |
callback | callback when the task is finished. The callback is called in the main thread instead of task thread. |
callbackParam | parameter used by the callback. |
f | task can be lambda function. |
args | task parameters. |
|
inline |
Enqueue a asynchronous task.
type | task type is io task, network task or others, each type of task has a thread to deal with it. |
callback | callback when the task is finished. The callback is called in the main thread instead of task thread. |
callbackParam | parameter used by the callback. |
f | task can be lambda function. |
args | task parameters. |
|
inline |
Stop tasks.
type | Task type you want to stop. |
|
inline |
Stop tasks.
type | Task type you want to stop. |
|
inline |
Stop tasks.
type | Task type you want to stop. |
const std::string CC_DLL STD_STRING_EMPTY |
A static global empty std::string install.
var STD_STRING_EMPTY |
A static global empty std::string install.
local STD_STRING_EMPTY |
A static global empty std::string install.