mirror of https://github.com/axmolengine/axmol.git
commit
b1831ea5fb
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2013-2014 Chukong Technologies
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -33,26 +33,26 @@ namespace cocostudio {
|
|||
|
||||
enum FrameType
|
||||
{
|
||||
kKeyframeMove = 0,
|
||||
kKeyframeScale,
|
||||
kKeyframeRotate,
|
||||
kKeyframeTint,
|
||||
kKeyframeFade,
|
||||
kKeyframeMax
|
||||
kKeyframeMove = 0,
|
||||
kKeyframeScale,
|
||||
kKeyframeRotate,
|
||||
kKeyframeTint,
|
||||
kKeyframeFade,
|
||||
kKeyframeMax
|
||||
};
|
||||
|
||||
enum class FrameEaseType
|
||||
{
|
||||
Custom = -1,
|
||||
Custom = -1,
|
||||
|
||||
LINERAR = 0,
|
||||
LINERAR = 0,
|
||||
|
||||
SINE_EASEIN,
|
||||
SINE_EASEOUT,
|
||||
SINE_EASEINOUT,
|
||||
SINE_EASEOUT,
|
||||
SINE_EASEINOUT,
|
||||
|
||||
QUAD_EASEIN,
|
||||
QUAD_EASEOUT,
|
||||
QUAD_EASEOUT,
|
||||
QUAD_EASEINOUT,
|
||||
|
||||
CUBIC_EASEIN,
|
||||
|
@ -64,7 +64,7 @@ enum class FrameEaseType
|
|||
QUART_EASEINOUT,
|
||||
|
||||
QUINT_EASEIN,
|
||||
QUINT_EASEOUT,
|
||||
QUINT_EASEOUT,
|
||||
QUINT_EASEINOUT,
|
||||
|
||||
EXPO_EASEIN,
|
||||
|
@ -87,7 +87,7 @@ enum class FrameEaseType
|
|||
BOUNCE_EASEOUT,
|
||||
BOUNCE_EASEINOUT,
|
||||
|
||||
TWEEN_EASING_MAX = 10000
|
||||
TWEEN_EASING_MAX = 10000
|
||||
};
|
||||
/**
|
||||
* @js NA
|
||||
|
@ -98,113 +98,113 @@ class CC_STUDIO_DLL ActionFrame: public cocos2d::Ref
|
|||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionFrame();
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionFrame();
|
||||
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionFrame();
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionFrame();
|
||||
|
||||
/**
|
||||
* Changes the index of action frame
|
||||
*
|
||||
* @param index the index of action frame
|
||||
*/
|
||||
void setFrameIndex(int index);
|
||||
/**
|
||||
* Changes the index of action frame
|
||||
*
|
||||
* @param index the index of action frame
|
||||
*/
|
||||
void setFrameIndex(int index);
|
||||
|
||||
/**
|
||||
* Gets the index of action frame
|
||||
*
|
||||
* @return the index of action frame
|
||||
*/
|
||||
int getFrameIndex();
|
||||
/**
|
||||
* Gets the index of action frame
|
||||
*
|
||||
* @return the index of action frame
|
||||
*/
|
||||
int getFrameIndex();
|
||||
|
||||
/**
|
||||
* Changes the time of action frame
|
||||
*
|
||||
* @param fTime the time of action frame
|
||||
*/
|
||||
void setFrameTime(float fTime);
|
||||
/**
|
||||
* Changes the time of action frame
|
||||
*
|
||||
* @param fTime the time of action frame
|
||||
*/
|
||||
void setFrameTime(float fTime);
|
||||
|
||||
/**
|
||||
* Gets the time of action frame
|
||||
*
|
||||
* @return fTime the time of action frame
|
||||
*/
|
||||
float getFrameTime();
|
||||
/**
|
||||
* Gets the time of action frame
|
||||
*
|
||||
* @return fTime the time of action frame
|
||||
*/
|
||||
float getFrameTime();
|
||||
|
||||
/**
|
||||
* Changes the type of action frame
|
||||
*
|
||||
* @param frameType the type of action frame
|
||||
*/
|
||||
void setFrameType(int frameType);
|
||||
/**
|
||||
* Changes the type of action frame
|
||||
*
|
||||
* @param frameType the type of action frame
|
||||
*/
|
||||
void setFrameType(int frameType);
|
||||
|
||||
/**
|
||||
* Gets the type of action frame
|
||||
*
|
||||
* @return the type of action frame
|
||||
*/
|
||||
int getFrameType();
|
||||
/**
|
||||
* Gets the type of action frame
|
||||
*
|
||||
* @return the type of action frame
|
||||
*/
|
||||
int getFrameType();
|
||||
|
||||
/**
|
||||
* Changes the easing type.
|
||||
*
|
||||
* @param easingType the easing type.
|
||||
*/
|
||||
void setEasingType(int easingType);
|
||||
/**
|
||||
* Changes the easing type.
|
||||
*
|
||||
* @param easingType the easing type.
|
||||
*/
|
||||
void setEasingType(int easingType);
|
||||
|
||||
/**
|
||||
* Gets the easing type.
|
||||
*
|
||||
* @return the easing type.
|
||||
*/
|
||||
int getEasingType();
|
||||
/**
|
||||
* Gets the easing type.
|
||||
*
|
||||
* @return the easing type.
|
||||
*/
|
||||
int getEasingType();
|
||||
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @parame duration the source ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration,ActionFrame* srcFrame);
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @parame duration the source ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration,ActionFrame* srcFrame);
|
||||
|
||||
/**
|
||||
*Set the ActionInterval easing parameter.
|
||||
*
|
||||
*@parame parameter the parameter for frame ease
|
||||
*
|
||||
*/
|
||||
virtual void setEasingParameter(std::vector<float>& parameter);
|
||||
/**
|
||||
*Set the ActionInterval easing parameter.
|
||||
*
|
||||
*@parame parameter the parameter for frame ease
|
||||
*
|
||||
*/
|
||||
virtual void setEasingParameter(std::vector<float>& parameter);
|
||||
protected:
|
||||
/**
|
||||
* Gets the Easing Action of ActionFrame.
|
||||
*
|
||||
* @parame action the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getEasingAction(cocos2d::ActionInterval* action);
|
||||
/**
|
||||
* Gets the Easing Action of ActionFrame.
|
||||
*
|
||||
* @parame action the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getEasingAction(cocos2d::ActionInterval* action);
|
||||
protected:
|
||||
int _frameType;
|
||||
int _frameIndex;
|
||||
float _fTime;
|
||||
FrameEaseType _easingType;
|
||||
std::vector<float> _Parameter;
|
||||
int _frameType;
|
||||
int _frameIndex;
|
||||
float _fTime;
|
||||
FrameEaseType _easingType;
|
||||
std::vector<float> _Parameter;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -215,38 +215,38 @@ class CC_STUDIO_DLL ActionMoveFrame:public ActionFrame
|
|||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionMoveFrame();
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionMoveFrame();
|
||||
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionMoveFrame();
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionMoveFrame();
|
||||
|
||||
/**
|
||||
* Changes the move action position.
|
||||
*
|
||||
* @param the move action position.
|
||||
*/
|
||||
void setPosition(cocos2d::Vec2 pos);
|
||||
/**
|
||||
* Changes the move action position.
|
||||
*
|
||||
* @param the move action position.
|
||||
*/
|
||||
void setPosition(cocos2d::Vec2 pos);
|
||||
|
||||
/**
|
||||
* Gets the move action position.
|
||||
*
|
||||
* @return the move action position.
|
||||
*/
|
||||
cocos2d::Vec2 getPosition();
|
||||
/**
|
||||
* Gets the move action position.
|
||||
*
|
||||
* @return the move action position.
|
||||
*/
|
||||
cocos2d::Vec2 getPosition();
|
||||
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
protected:
|
||||
cocos2d::Vec2 _position;
|
||||
};
|
||||
|
@ -259,55 +259,55 @@ class CC_STUDIO_DLL ActionScaleFrame:public ActionFrame
|
|||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionScaleFrame();
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionScaleFrame();
|
||||
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionScaleFrame();
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionScaleFrame();
|
||||
|
||||
/**
|
||||
* Changes the scale action scaleX.
|
||||
*
|
||||
* @param the scale action scaleX.
|
||||
*/
|
||||
void setScaleX(float scaleX);
|
||||
/**
|
||||
* Changes the scale action scaleX.
|
||||
*
|
||||
* @param the scale action scaleX.
|
||||
*/
|
||||
void setScaleX(float scaleX);
|
||||
|
||||
/**
|
||||
* Gets the scale action scaleX.
|
||||
*
|
||||
* @return the scale action scaleX.
|
||||
*/
|
||||
float getScaleX();
|
||||
/**
|
||||
* Gets the scale action scaleX.
|
||||
*
|
||||
* @return the scale action scaleX.
|
||||
*/
|
||||
float getScaleX();
|
||||
|
||||
/**
|
||||
* Changes the scale action scaleY.
|
||||
*
|
||||
* @param rotation the scale action scaleY.
|
||||
*/
|
||||
void setScaleY(float scaleY);
|
||||
/**
|
||||
* Changes the scale action scaleY.
|
||||
*
|
||||
* @param rotation the scale action scaleY.
|
||||
*/
|
||||
void setScaleY(float scaleY);
|
||||
|
||||
/**
|
||||
* Gets the scale action scaleY.
|
||||
*
|
||||
* @return the the scale action scaleY.
|
||||
*/
|
||||
float getScaleY();
|
||||
/**
|
||||
* Gets the scale action scaleY.
|
||||
*
|
||||
* @return the the scale action scaleY.
|
||||
*/
|
||||
float getScaleY();
|
||||
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
protected:
|
||||
float _scaleX;
|
||||
float _scaleY;
|
||||
float _scaleX;
|
||||
float _scaleY;
|
||||
};
|
||||
/**
|
||||
* @js NA
|
||||
|
@ -317,50 +317,50 @@ class CC_STUDIO_DLL ActionRotationFrame:public ActionFrame
|
|||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionRotationFrame();
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionRotationFrame();
|
||||
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionRotationFrame();
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionRotationFrame();
|
||||
|
||||
/**
|
||||
* Changes rotate action rotation.
|
||||
*
|
||||
* @param rotation rotate action rotation.
|
||||
*/
|
||||
void setRotation(float rotation);
|
||||
/**
|
||||
* Changes rotate action rotation.
|
||||
*
|
||||
* @param rotation rotate action rotation.
|
||||
*/
|
||||
void setRotation(float rotation);
|
||||
|
||||
/**
|
||||
* Gets the rotate action rotation.
|
||||
*
|
||||
* @return the rotate action rotation.
|
||||
*/
|
||||
float getRotation();
|
||||
/**
|
||||
* Gets the rotate action rotation.
|
||||
*
|
||||
* @return the rotate action rotation.
|
||||
*/
|
||||
float getRotation();
|
||||
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @parame duration the source ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration,ActionFrame* srcFrame);
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @parame duration the source ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration,ActionFrame* srcFrame);
|
||||
public:
|
||||
float _rotation;
|
||||
float _rotation;
|
||||
};
|
||||
/**
|
||||
* @js NA
|
||||
|
@ -370,40 +370,40 @@ class CC_STUDIO_DLL ActionFadeFrame:public ActionFrame
|
|||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionFadeFrame();
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionFadeFrame();
|
||||
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionFadeFrame();
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionFadeFrame();
|
||||
|
||||
/**
|
||||
* Changes the fade action opacity.
|
||||
*
|
||||
* @param opacity the fade action opacity
|
||||
*/
|
||||
void setOpacity(int opacity);
|
||||
/**
|
||||
* Changes the fade action opacity.
|
||||
*
|
||||
* @param opacity the fade action opacity
|
||||
*/
|
||||
void setOpacity(int opacity);
|
||||
|
||||
/**
|
||||
* Gets the fade action opacity.
|
||||
*
|
||||
* @return the fade action opacity.
|
||||
*/
|
||||
int getOpacity();
|
||||
/**
|
||||
* Gets the fade action opacity.
|
||||
*
|
||||
* @return the fade action opacity.
|
||||
*/
|
||||
int getOpacity();
|
||||
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
protected:
|
||||
float _opacity;
|
||||
float _opacity;
|
||||
};
|
||||
/**
|
||||
* @js NA
|
||||
|
@ -414,40 +414,40 @@ class CC_STUDIO_DLL ActionTintFrame:public ActionFrame
|
|||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionTintFrame();
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionTintFrame();
|
||||
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionTintFrame();
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionTintFrame();
|
||||
|
||||
/**
|
||||
* Changes the tint action color.
|
||||
*
|
||||
* @param ccolor the tint action color
|
||||
*/
|
||||
void setColor(cocos2d::Color3B ccolor);
|
||||
/**
|
||||
* Changes the tint action color.
|
||||
*
|
||||
* @param ccolor the tint action color
|
||||
*/
|
||||
void setColor(cocos2d::Color3B ccolor);
|
||||
|
||||
/**
|
||||
* Gets the tint action color.
|
||||
*
|
||||
* @return the tint action color.
|
||||
*/
|
||||
cocos2d::Color3B getColor();
|
||||
/**
|
||||
* Gets the tint action color.
|
||||
*
|
||||
* @return the tint action color.
|
||||
*/
|
||||
cocos2d::Color3B getColor();
|
||||
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
/**
|
||||
* Gets the ActionInterval of ActionFrame.
|
||||
*
|
||||
* @parame duration the duration time of ActionFrame
|
||||
*
|
||||
* @return ActionInterval
|
||||
*/
|
||||
virtual cocos2d::ActionInterval* getAction(float duration);
|
||||
protected:
|
||||
cocos2d::Color3B _color;
|
||||
cocos2d::Color3B _color;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -32,25 +32,25 @@ namespace cocostudio {
|
|||
|
||||
enum FrameEasingType
|
||||
{
|
||||
kframeEasingInstant,
|
||||
kframeEasingInstant,
|
||||
|
||||
kframeEasingLinear,
|
||||
kframeEasingLinear,
|
||||
|
||||
kframeEasingCubicIn,
|
||||
kframeEasingCubicOut,
|
||||
kframeEasingCubicInOut,
|
||||
kframeEasingCubicIn,
|
||||
kframeEasingCubicOut,
|
||||
kframeEasingCubicInOut,
|
||||
|
||||
kframeEasingElasticIn,
|
||||
kframeEasingElasticOut,
|
||||
kframeEasingElasticInOut,
|
||||
kframeEasingElasticIn,
|
||||
kframeEasingElasticOut,
|
||||
kframeEasingElasticInOut,
|
||||
|
||||
kframeEasingBounceIn,
|
||||
kframeEasingBounceOut,
|
||||
kframeEasingBounceInOut,
|
||||
kframeEasingBounceIn,
|
||||
kframeEasingBounceOut,
|
||||
kframeEasingBounceInOut,
|
||||
|
||||
kframeEasingBackIn,
|
||||
kframeEasingBackOut,
|
||||
kframeEasingBackInOut,
|
||||
kframeEasingBackIn,
|
||||
kframeEasingBackOut,
|
||||
kframeEasingBackInOut,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -60,15 +60,15 @@ enum FrameEasingType
|
|||
class CC_STUDIO_DLL ActionFrameEasing:public cocos2d::Ref
|
||||
{
|
||||
protected:
|
||||
FrameEasingType _type;
|
||||
float _fValue;
|
||||
FrameEasingType _type;
|
||||
float _fValue;
|
||||
public:
|
||||
ActionFrameEasing();
|
||||
virtual ~ActionFrameEasing();
|
||||
ActionFrameEasing();
|
||||
virtual ~ActionFrameEasing();
|
||||
|
||||
float bounceTime(float t);
|
||||
float bounceTime(float t);
|
||||
|
||||
float easeValue(float t);
|
||||
float easeValue(float t);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -38,89 +38,89 @@ class CC_STUDIO_DLL ActionManagerEx:public cocos2d::Ref
|
|||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
* @js ctor
|
||||
*/
|
||||
ActionManagerEx();
|
||||
/**
|
||||
* Default constructor
|
||||
* @js ctor
|
||||
*/
|
||||
ActionManagerEx();
|
||||
|
||||
/**
|
||||
* Default destructor
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual ~ActionManagerEx();
|
||||
/**
|
||||
* Default destructor
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual ~ActionManagerEx();
|
||||
|
||||
/**
|
||||
* Gets the static instance of ActionManager.
|
||||
* @js getInstance
|
||||
* @lua getInstance
|
||||
*/
|
||||
static ActionManagerEx* getInstance();
|
||||
/**
|
||||
* Gets the static instance of ActionManager.
|
||||
* @js getInstance
|
||||
* @lua getInstance
|
||||
*/
|
||||
static ActionManagerEx* getInstance();
|
||||
|
||||
/**
|
||||
* Purges ActionManager point.
|
||||
* @js purge
|
||||
* @lua destroyActionManager
|
||||
*/
|
||||
static void destroyInstance();
|
||||
/**
|
||||
* Purges ActionManager point.
|
||||
* @js purge
|
||||
* @lua destroyActionManager
|
||||
*/
|
||||
static void destroyInstance();
|
||||
|
||||
/**
|
||||
* Gets an ActionObject with a name.
|
||||
*
|
||||
* @param jsonName UI file name
|
||||
*
|
||||
* @param actionName action name in the UI file.
|
||||
*
|
||||
* @return ActionObject which named as the param name
|
||||
*/
|
||||
ActionObject* getActionByName(const char* jsonName,const char* actionName);
|
||||
/**
|
||||
* Gets an ActionObject with a name.
|
||||
*
|
||||
* @param jsonName UI file name
|
||||
*
|
||||
* @param actionName action name in the UI file.
|
||||
*
|
||||
* @return ActionObject which named as the param name
|
||||
*/
|
||||
ActionObject* getActionByName(const char* jsonName,const char* actionName);
|
||||
|
||||
/**
|
||||
* Play an Action with a name.
|
||||
*
|
||||
* @param jsonName UI file name
|
||||
*
|
||||
* @param actionName action name in teh UIfile.
|
||||
*
|
||||
* @return ActionObject which named as the param name
|
||||
*/
|
||||
ActionObject* playActionByName(const char* jsonName,const char* actionName);
|
||||
/**
|
||||
* Play an Action with a name.
|
||||
*
|
||||
* @param jsonName UI file name
|
||||
*
|
||||
* @param actionName action name in teh UIfile.
|
||||
*
|
||||
* @return ActionObject which named as the param name
|
||||
*/
|
||||
ActionObject* playActionByName(const char* jsonName,const char* actionName);
|
||||
|
||||
/**
|
||||
* Play an Action with a name.
|
||||
*
|
||||
* @param jsonName UI file name
|
||||
*
|
||||
* @param actionName action name in teh UIfile.
|
||||
*
|
||||
* @param func ui action call back
|
||||
*/
|
||||
ActionObject* playActionByName(const char* jsonName,const char* actionName, cocos2d::CallFunc* func);
|
||||
/**
|
||||
* Play an Action with a name.
|
||||
*
|
||||
* @param jsonName UI file name
|
||||
*
|
||||
* @param actionName action name in teh UIfile.
|
||||
*
|
||||
* @param func ui action call back
|
||||
*/
|
||||
ActionObject* playActionByName(const char* jsonName,const char* actionName, cocos2d::CallFunc* func);
|
||||
|
||||
/**
|
||||
* Stop an Action with a name.
|
||||
*
|
||||
* @param jsonName UI file name
|
||||
*
|
||||
* @param actionName action name in teh UIfile.
|
||||
*
|
||||
* @return ActionObject which named as the param name
|
||||
*/
|
||||
ActionObject* stopActionByName(const char* jsonName,const char* actionName);
|
||||
/**
|
||||
* Stop an Action with a name.
|
||||
*
|
||||
* @param jsonName UI file name
|
||||
*
|
||||
* @param actionName action name in teh UIfile.
|
||||
*
|
||||
* @return ActionObject which named as the param name
|
||||
*/
|
||||
ActionObject* stopActionByName(const char* jsonName,const char* actionName);
|
||||
|
||||
/*init properties with json dictionay*/
|
||||
void initWithDictionary(const char* jsonName,const rapidjson::Value &dic, Ref* root);
|
||||
void initWithBinary(const char* file, Ref* root, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode);
|
||||
/*init properties with json dictionay*/
|
||||
void initWithDictionary(const char* jsonName,const rapidjson::Value &dic, Ref* root);
|
||||
void initWithBinary(const char* file, Ref* root, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode);
|
||||
|
||||
/**
|
||||
* Release all actions.
|
||||
*
|
||||
*/
|
||||
void releaseActions();
|
||||
/**
|
||||
* Release all actions.
|
||||
*
|
||||
*/
|
||||
void releaseActions();
|
||||
|
||||
protected:
|
||||
std::unordered_map<std::string, cocos2d::Vector<ActionObject*>> _actionDic;
|
||||
std::unordered_map<std::string, cocos2d::Vector<ActionObject*>> _actionDic;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -41,149 +41,149 @@ class CC_STUDIO_DLL ActionNode : public cocos2d::Ref
|
|||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionNode();
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionNode();
|
||||
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionNode();
|
||||
/**
|
||||
* Sets the time interval of frame.
|
||||
*
|
||||
* @param fTime the time interval of frame
|
||||
*/
|
||||
void setUnitTime(float fTime);
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionNode();
|
||||
/**
|
||||
* Sets the time interval of frame.
|
||||
*
|
||||
* @param fTime the time interval of frame
|
||||
*/
|
||||
void setUnitTime(float fTime);
|
||||
|
||||
/**
|
||||
* Gets the time interval of frame.
|
||||
*
|
||||
* @return fTime the time interval of frame
|
||||
*/
|
||||
float getUnitTime();
|
||||
/**
|
||||
* Sets tag for ActionNode
|
||||
*
|
||||
* @param tag tag of ActionNode
|
||||
*/
|
||||
void setActionTag(int tag);
|
||||
/**
|
||||
* Gets the time interval of frame.
|
||||
*
|
||||
* @return fTime the time interval of frame
|
||||
*/
|
||||
float getUnitTime();
|
||||
/**
|
||||
* Sets tag for ActionNode
|
||||
*
|
||||
* @param tag tag of ActionNode
|
||||
*/
|
||||
void setActionTag(int tag);
|
||||
|
||||
/**
|
||||
* Gets tag for ActionNode
|
||||
*
|
||||
* @return tag tag of ActionNode
|
||||
*/
|
||||
int getActionTag();
|
||||
/**
|
||||
* Gets tag for ActionNode
|
||||
*
|
||||
* @return tag tag of ActionNode
|
||||
*/
|
||||
int getActionTag();
|
||||
|
||||
/**
|
||||
* Sets node which will run a action.
|
||||
*
|
||||
* @param node which will run a action
|
||||
*/
|
||||
void setObject(cocos2d::Ref* node);
|
||||
/**
|
||||
* Sets node which will run a action.
|
||||
*
|
||||
* @param node which will run a action
|
||||
*/
|
||||
void setObject(cocos2d::Ref* node);
|
||||
|
||||
/**
|
||||
* Gets node which will run a action.
|
||||
*
|
||||
* @return node which will run a action
|
||||
*/
|
||||
cocos2d::Ref* getObject();
|
||||
/**
|
||||
* Gets node which will run a action.
|
||||
*
|
||||
* @return node which will run a action
|
||||
*/
|
||||
cocos2d::Ref* getObject();
|
||||
|
||||
/**
|
||||
* Insets a ActionFrame to ActionNode.
|
||||
*
|
||||
* @param index the index of ActionFrame
|
||||
*
|
||||
* @param frame the ActionFrame which will be inserted
|
||||
*/
|
||||
void insertFrame(int index, ActionFrame* frame);
|
||||
/**
|
||||
* Insets a ActionFrame to ActionNode.
|
||||
*
|
||||
* @param index the index of ActionFrame
|
||||
*
|
||||
* @param frame the ActionFrame which will be inserted
|
||||
*/
|
||||
void insertFrame(int index, ActionFrame* frame);
|
||||
|
||||
/**
|
||||
* Pushs back a ActionFrame to ActionNode.
|
||||
*
|
||||
* @param frame the ActionFrame which will be added
|
||||
*/
|
||||
void addFrame(ActionFrame* frame);
|
||||
/**
|
||||
* Pushs back a ActionFrame to ActionNode.
|
||||
*
|
||||
* @param frame the ActionFrame which will be added
|
||||
*/
|
||||
void addFrame(ActionFrame* frame);
|
||||
|
||||
/**
|
||||
* Remove a ActionFrame from ActionNode.
|
||||
*
|
||||
* @param frame the ActionFrame which will be removed
|
||||
*/
|
||||
void deleteFrame(ActionFrame* frame );
|
||||
/**
|
||||
* Remove a ActionFrame from ActionNode.
|
||||
*
|
||||
* @param frame the ActionFrame which will be removed
|
||||
*/
|
||||
void deleteFrame(ActionFrame* frame );
|
||||
|
||||
/**
|
||||
* Remove all ActionFrames from ActionNode.
|
||||
*/
|
||||
void clearAllFrame();
|
||||
/**
|
||||
* Remove all ActionFrames from ActionNode.
|
||||
*/
|
||||
void clearAllFrame();
|
||||
|
||||
/**
|
||||
* Gets index of first ActionFrame.
|
||||
*
|
||||
* @return index of first ActionFrame
|
||||
*/
|
||||
int getFirstFrameIndex();
|
||||
/**
|
||||
* Gets index of first ActionFrame.
|
||||
*
|
||||
* @return index of first ActionFrame
|
||||
*/
|
||||
int getFirstFrameIndex();
|
||||
|
||||
/**
|
||||
* Gets index of last ActionFrame.
|
||||
*
|
||||
* @return index of last ActionFrame
|
||||
*/
|
||||
int getLastFrameIndex();
|
||||
/**
|
||||
* Gets index of last ActionFrame.
|
||||
*
|
||||
* @return index of last ActionFrame
|
||||
*/
|
||||
int getLastFrameIndex();
|
||||
|
||||
/**
|
||||
* Updates action states to some time.
|
||||
*
|
||||
* @param fTime the time when need to update
|
||||
*/
|
||||
virtual bool updateActionToTimeLine(float fTime);
|
||||
/**
|
||||
* Updates action states to some time.
|
||||
*
|
||||
* @param fTime the time when need to update
|
||||
*/
|
||||
virtual bool updateActionToTimeLine(float fTime);
|
||||
|
||||
/**
|
||||
* Play the action.
|
||||
*/
|
||||
virtual void playAction();
|
||||
/**
|
||||
* Play the action.
|
||||
*/
|
||||
virtual void playAction();
|
||||
|
||||
/**
|
||||
* Stop the action.
|
||||
*/
|
||||
virtual void stopAction();
|
||||
/**
|
||||
* Stop the action.
|
||||
*/
|
||||
virtual void stopAction();
|
||||
|
||||
/*init properties with a json dictionary*/
|
||||
virtual void initWithDictionary(const rapidjson::Value& dic, cocos2d::Ref* root);
|
||||
virtual void initWithBinary(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode, Ref* root);
|
||||
/*init properties with a json dictionary*/
|
||||
virtual void initWithDictionary(const rapidjson::Value& dic, cocos2d::Ref* root);
|
||||
virtual void initWithBinary(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode, Ref* root);
|
||||
|
||||
/**
|
||||
* Gets if the action is done once time.
|
||||
*
|
||||
* @return that if the action is done once time
|
||||
*/
|
||||
virtual bool isActionDoneOnce();
|
||||
/**
|
||||
* Gets if the action is done once time.
|
||||
*
|
||||
* @return that if the action is done once time
|
||||
*/
|
||||
virtual bool isActionDoneOnce();
|
||||
protected:
|
||||
int valueToInt(const std::string& value);
|
||||
bool valueToBool(const std::string& value);
|
||||
float valueToFloat(const std::string& value);
|
||||
|
||||
int _currentFrameIndex;
|
||||
int _destFrameIndex;
|
||||
int _currentFrameIndex;
|
||||
int _destFrameIndex;
|
||||
|
||||
float _fUnitTime;
|
||||
float _fUnitTime;
|
||||
|
||||
int _actionTag;
|
||||
cocos2d::Spawn * _actionSpawn;
|
||||
cocos2d::Action* _action;
|
||||
cocos2d::Ref* _object;
|
||||
int _actionTag;
|
||||
cocos2d::Spawn * _actionSpawn;
|
||||
cocos2d::Action* _action;
|
||||
cocos2d::Ref* _object;
|
||||
|
||||
std::vector<cocos2d::Vector<ActionFrame*>*> _frameArray;
|
||||
int _frameArrayNum;
|
||||
std::vector<cocos2d::Vector<ActionFrame*>*> _frameArray;
|
||||
int _frameArrayNum;
|
||||
|
||||
protected:
|
||||
virtual cocos2d::Node* getActionNode();
|
||||
virtual cocos2d::Spawn * refreshActionProperty();
|
||||
virtual void runAction();
|
||||
virtual void initActionNodeFromRoot(cocos2d::Ref* root);
|
||||
virtual void easingToFrame(float duration,float delayTime,ActionFrame* srcFrame,ActionFrame* destFrame);
|
||||
virtual cocos2d::Node* getActionNode();
|
||||
virtual cocos2d::Spawn * refreshActionProperty();
|
||||
virtual void runAction();
|
||||
virtual void initActionNodeFromRoot(cocos2d::Ref* root);
|
||||
virtual void easingToFrame(float duration,float delayTime,ActionFrame* srcFrame,ActionFrame* destFrame);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -43,148 +43,148 @@ class CC_STUDIO_DLL ActionObject : public cocos2d::Ref
|
|||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionObject();
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ActionObject();
|
||||
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionObject();
|
||||
/**
|
||||
* Default destructor
|
||||
*/
|
||||
virtual ~ActionObject();
|
||||
|
||||
/**
|
||||
* Sets name for object
|
||||
*
|
||||
* @param name name of object
|
||||
*/
|
||||
void setName(const char* name);
|
||||
/**
|
||||
* Sets name for object
|
||||
*
|
||||
* @param name name of object
|
||||
*/
|
||||
void setName(const char* name);
|
||||
|
||||
/**
|
||||
* Gets name of object
|
||||
*
|
||||
* @return name of object
|
||||
*/
|
||||
const char* getName();
|
||||
/**
|
||||
* Gets name of object
|
||||
*
|
||||
* @return name of object
|
||||
*/
|
||||
const char* getName();
|
||||
|
||||
/**
|
||||
* Sets if the action will loop play.
|
||||
*
|
||||
* @param bLoop that if the action will loop play
|
||||
*/
|
||||
void setLoop(bool bLoop);
|
||||
/**
|
||||
* Sets if the action will loop play.
|
||||
*
|
||||
* @param bLoop that if the action will loop play
|
||||
*/
|
||||
void setLoop(bool bLoop);
|
||||
|
||||
/**
|
||||
* Gets if the action will loop play.
|
||||
*
|
||||
* @return that if the action will loop play
|
||||
*/
|
||||
bool getLoop();
|
||||
/**
|
||||
* Gets if the action will loop play.
|
||||
*
|
||||
* @return that if the action will loop play
|
||||
*/
|
||||
bool getLoop();
|
||||
|
||||
/**
|
||||
* Sets the time interval of frame.
|
||||
*
|
||||
* @param fTime the time interval of frame
|
||||
*/
|
||||
void setUnitTime(float fTime);
|
||||
/**
|
||||
* Sets the time interval of frame.
|
||||
*
|
||||
* @param fTime the time interval of frame
|
||||
*/
|
||||
void setUnitTime(float fTime);
|
||||
|
||||
/**
|
||||
* Gets the time interval of frame.
|
||||
*
|
||||
* @return the time interval of frame
|
||||
*/
|
||||
float getUnitTime();
|
||||
/**
|
||||
* Gets the time interval of frame.
|
||||
*
|
||||
* @return the time interval of frame
|
||||
*/
|
||||
float getUnitTime();
|
||||
|
||||
/**
|
||||
* Sets the current time of frame.
|
||||
*
|
||||
* @param fTime the current time of frame
|
||||
*/
|
||||
void setCurrentTime(float fTime);
|
||||
/**
|
||||
* Sets the current time of frame.
|
||||
*
|
||||
* @param fTime the current time of frame
|
||||
*/
|
||||
void setCurrentTime(float fTime);
|
||||
|
||||
/**
|
||||
* Gets the current time of frame.
|
||||
*
|
||||
* @return the current time of frame
|
||||
*/
|
||||
float getCurrentTime();
|
||||
/**
|
||||
* Gets the current time of frame.
|
||||
*
|
||||
* @return the current time of frame
|
||||
*/
|
||||
float getCurrentTime();
|
||||
|
||||
/**
|
||||
* Gets the total time of frame.
|
||||
*
|
||||
* @return the total time of frame
|
||||
*/
|
||||
float getTotalTime();
|
||||
/**
|
||||
* Gets the total time of frame.
|
||||
*
|
||||
* @return the total time of frame
|
||||
*/
|
||||
float getTotalTime();
|
||||
|
||||
/**
|
||||
* Return if the action is playing.
|
||||
*
|
||||
* @return true if the action is playing, false the otherwise
|
||||
*/
|
||||
bool isPlaying();
|
||||
/**
|
||||
* Return if the action is playing.
|
||||
*
|
||||
* @return true if the action is playing, false the otherwise
|
||||
*/
|
||||
bool isPlaying();
|
||||
|
||||
/**
|
||||
* Play the action.
|
||||
*/
|
||||
void play();
|
||||
/**
|
||||
* Play the action.
|
||||
*/
|
||||
void play();
|
||||
|
||||
/**
|
||||
* Play the action.
|
||||
*
|
||||
* @param func Action Call Back
|
||||
*/
|
||||
void play(cocos2d::CallFunc* func);
|
||||
/**
|
||||
* Play the action.
|
||||
*
|
||||
* @param func Action Call Back
|
||||
*/
|
||||
void play(cocos2d::CallFunc* func);
|
||||
|
||||
/**
|
||||
* Pause the action.
|
||||
*/
|
||||
void pause();
|
||||
/**
|
||||
* Pause the action.
|
||||
*/
|
||||
void pause();
|
||||
|
||||
/**
|
||||
* Stop the action.
|
||||
*/
|
||||
void stop();
|
||||
/**
|
||||
* Stop the action.
|
||||
*/
|
||||
void stop();
|
||||
|
||||
/**
|
||||
* Adds a ActionNode to play the action.
|
||||
*
|
||||
* @param node the ActionNode which will play the action
|
||||
*/
|
||||
void addActionNode(ActionNode* node);
|
||||
/**
|
||||
* Adds a ActionNode to play the action.
|
||||
*
|
||||
* @param node the ActionNode which will play the action
|
||||
*/
|
||||
void addActionNode(ActionNode* node);
|
||||
|
||||
/**
|
||||
* Removes a ActionNode which play the action.
|
||||
*
|
||||
* @param node the ActionNode which play the action
|
||||
*/
|
||||
void removeActionNode(ActionNode* node);
|
||||
/**
|
||||
* Removes a ActionNode which play the action.
|
||||
*
|
||||
* @param node the ActionNode which play the action
|
||||
*/
|
||||
void removeActionNode(ActionNode* node);
|
||||
|
||||
/*update frame method*/
|
||||
void updateToFrameByTime(float fTime);
|
||||
/*update frame method*/
|
||||
void updateToFrameByTime(float fTime);
|
||||
|
||||
/*init properties with a json dictionary*/
|
||||
void initWithDictionary(const rapidjson::Value& dic, cocos2d::Ref* root);
|
||||
/*init properties with a json dictionary*/
|
||||
void initWithDictionary(const rapidjson::Value& dic, cocos2d::Ref* root);
|
||||
|
||||
void initWithBinary(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode, cocos2d::Ref* root);
|
||||
void initWithBinary(CocoLoader* cocoLoader, stExpCocoNode* pCocoNode, cocos2d::Ref* root);
|
||||
|
||||
|
||||
/*scheduler update function*/
|
||||
void simulationActionUpdate(float dt);
|
||||
/*scheduler update function*/
|
||||
void simulationActionUpdate(float dt);
|
||||
protected:
|
||||
int valueToInt(const std::string& value);
|
||||
bool valueToBool(const std::string& value);
|
||||
float valueToFloat(const std::string& value);
|
||||
|
||||
cocos2d::Vector<ActionNode*> _actionNodeList;
|
||||
std::string _name;
|
||||
bool _loop;
|
||||
bool _bPause;
|
||||
bool _bPlaying;
|
||||
float _fUnitTime;
|
||||
float _currentTime;
|
||||
cocos2d::Scheduler *_pScheduler;
|
||||
cocos2d::CallFunc *_CallBack;
|
||||
float _fTotalTime;
|
||||
cocos2d::Vector<ActionNode*> _actionNodeList;
|
||||
std::string _name;
|
||||
bool _loop;
|
||||
bool _bPause;
|
||||
bool _bPlaying;
|
||||
float _fUnitTime;
|
||||
float _currentTime;
|
||||
cocos2d::Scheduler *_pScheduler;
|
||||
cocos2d::CallFunc *_CallBack;
|
||||
float _fTotalTime;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -176,7 +176,7 @@ public:
|
|||
* @lua NA
|
||||
*/
|
||||
inline const cocos2d::BlendFunc &getBlendFunc(void) const override{ return _blendFunc; }
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Set contentsize and Calculate anchor point.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -75,7 +75,7 @@ public:
|
|||
*/
|
||||
static ArmatureAnimation *create(Armature *armature);
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
ArmatureAnimation();
|
||||
|
@ -275,13 +275,13 @@ protected:
|
|||
//! Scale the animation speed
|
||||
float _speedScale;
|
||||
|
||||
MovementData *_movementData; //! MovementData save all MovementFrameDatas this animation used.
|
||||
MovementData *_movementData; //! MovementData save all MovementFrameDatas this animation used.
|
||||
|
||||
Armature *_armature; //! A weak reference of armature
|
||||
Armature *_armature; //! A weak reference of armature
|
||||
|
||||
std::string _movementID; //! Current movment's name
|
||||
std::string _movementID; //! Current movment's name
|
||||
|
||||
int _toIndex; //! The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
|
||||
int _toIndex; //! The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
|
||||
|
||||
cocos2d::Vector<Tween*> _tweenList;
|
||||
|
||||
|
|
|
@ -40,12 +40,12 @@ struct RelativeData
|
|||
};
|
||||
|
||||
/**
|
||||
* @brief format and manage armature configuration and armature animation
|
||||
* @brief format and manage armature configuration and armature animation
|
||||
*/
|
||||
class CC_STUDIO_DLL ArmatureDataManager : public cocos2d::Ref
|
||||
{
|
||||
public:
|
||||
/** @deprecated Use getInstance() instead */
|
||||
/** @deprecated Use getInstance() instead */
|
||||
CC_DEPRECATED_ATTRIBUTE static ArmatureDataManager *sharedArmatureDataManager() { return ArmatureDataManager::getInstance(); }
|
||||
|
||||
/** @deprecated Use destoryInstance() instead */
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
static void destroyInstance();
|
||||
|
||||
private:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
ArmatureDataManager(void);
|
||||
|
@ -80,82 +80,82 @@ public:
|
|||
void addArmatureData(const std::string& id, ArmatureData *armatureData, const std::string& configFilePath = "");
|
||||
|
||||
/**
|
||||
* @brief get armature data
|
||||
* @param id the id of the armature data you want to get
|
||||
* @return ArmatureData *
|
||||
* @brief get armature data
|
||||
* @param id the id of the armature data you want to get
|
||||
* @return ArmatureData *
|
||||
*/
|
||||
ArmatureData *getArmatureData(const std::string& id);
|
||||
|
||||
/**
|
||||
* @brief remove armature data
|
||||
* @param id the id of the armature data you want to get
|
||||
* @brief remove armature data
|
||||
* @param id the id of the armature data you want to get
|
||||
*/
|
||||
void removeArmatureData(const std::string& id);
|
||||
|
||||
/**
|
||||
* @brief add animation data
|
||||
* @param id the id of the animation data
|
||||
* @brief add animation data
|
||||
* @param id the id of the animation data
|
||||
* @return AnimationData *
|
||||
*/
|
||||
void addAnimationData(const std::string& id, AnimationData *animationData, const std::string& configFilePath = "");
|
||||
|
||||
/**
|
||||
* @brief get animation data from _animationDatas(Dictionary)
|
||||
* @param id the id of the animation data you want to get
|
||||
* @brief get animation data from _animationDatas(Dictionary)
|
||||
* @param id the id of the animation data you want to get
|
||||
* @return AnimationData *
|
||||
*/
|
||||
AnimationData *getAnimationData(const std::string& id);
|
||||
|
||||
/**
|
||||
* @brief remove animation data
|
||||
* @param id the id of the animation data
|
||||
* @brief remove animation data
|
||||
* @param id the id of the animation data
|
||||
*/
|
||||
void removeAnimationData(const std::string& id);
|
||||
|
||||
/**
|
||||
* @brief add texture data
|
||||
* @param id the id of the texture data
|
||||
* @brief add texture data
|
||||
* @param id the id of the texture data
|
||||
* @return TextureData *
|
||||
*/
|
||||
void addTextureData(const std::string& id, TextureData *textureData, const std::string& configFilePath = "");
|
||||
|
||||
/**
|
||||
* @brief get texture data
|
||||
* @param id the id of the texture data you want to get
|
||||
* @brief get texture data
|
||||
* @param id the id of the texture data you want to get
|
||||
* @return TextureData *
|
||||
*/
|
||||
TextureData *getTextureData(const std::string& id);
|
||||
|
||||
/**
|
||||
* @brief remove texture data
|
||||
* @param id the id of the texture data you want to get
|
||||
* @brief remove texture data
|
||||
* @param id the id of the texture data you want to get
|
||||
*/
|
||||
void removeTextureData(const std::string& id);
|
||||
|
||||
/**
|
||||
* @brief Add ArmatureFileInfo, it is managed by ArmatureDataManager.
|
||||
* @brief Add ArmatureFileInfo, it is managed by ArmatureDataManager.
|
||||
*/
|
||||
void addArmatureFileInfo(const std::string& configFilePath);
|
||||
|
||||
/**
|
||||
* @brief Add ArmatureFileInfo, it is managed by ArmatureDataManager.
|
||||
* It will load data in a new thread
|
||||
* @brief Add ArmatureFileInfo, it is managed by ArmatureDataManager.
|
||||
* It will load data in a new thread
|
||||
*/
|
||||
void addArmatureFileInfoAsync(const std::string& configFilePath, cocos2d::Ref *target, cocos2d::SEL_SCHEDULE selector);
|
||||
|
||||
/**
|
||||
* @brief Add ArmatureFileInfo, it is managed by ArmatureDataManager.
|
||||
* @brief Add ArmatureFileInfo, it is managed by ArmatureDataManager.
|
||||
*/
|
||||
void addArmatureFileInfo(const std::string& imagePath, const std::string& plistPath, const std::string& configFilePath);
|
||||
|
||||
/**
|
||||
* @brief Add ArmatureFileInfo, it is managed by ArmatureDataManager.
|
||||
* It will load data in a new thread
|
||||
* @brief Add ArmatureFileInfo, it is managed by ArmatureDataManager.
|
||||
* It will load data in a new thread
|
||||
*/
|
||||
void addArmatureFileInfoAsync(const std::string& imagePath, const std::string& plistPath, const std::string& configFilePath, cocos2d::Ref *target, cocos2d::SEL_SCHEDULE selector);
|
||||
|
||||
/**
|
||||
* @brief Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name
|
||||
* @brief Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name
|
||||
*/
|
||||
void addSpriteFrameFromFile(const std::string& plistPath, const std::string& imagePath, const std::string& configFilePath = "");
|
||||
|
||||
|
@ -163,7 +163,7 @@ public:
|
|||
|
||||
|
||||
/**
|
||||
* @brief Juge whether or not need auto load sprite file
|
||||
* @brief Juge whether or not need auto load sprite file
|
||||
*/
|
||||
bool isAutoLoadSpriteFile();
|
||||
|
||||
|
@ -177,23 +177,23 @@ protected:
|
|||
RelativeData *getRelativeData(const std::string& configFilePath);
|
||||
private:
|
||||
/**
|
||||
* @brief save amature datas
|
||||
* @key std::string
|
||||
* @value ArmatureData *
|
||||
* @brief save amature datas
|
||||
* @key std::string
|
||||
* @value ArmatureData *
|
||||
*/
|
||||
cocos2d::Map<std::string, ArmatureData*> _armarureDatas;
|
||||
|
||||
/**
|
||||
* @brief save animation datas
|
||||
* @key std::string
|
||||
* @value AnimationData *
|
||||
* @brief save animation datas
|
||||
* @key std::string
|
||||
* @value AnimationData *
|
||||
*/
|
||||
cocos2d::Map<std::string, AnimationData*> _animationDatas;
|
||||
|
||||
/**
|
||||
* @brief save texture datas
|
||||
* @key std::string
|
||||
* @value TextureData *
|
||||
* @brief save texture datas
|
||||
* @key std::string
|
||||
* @value TextureData *
|
||||
*/
|
||||
cocos2d::Map<std::string, TextureData*> _textureDatas;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -40,7 +40,7 @@ class CC_STUDIO_DLL BatchNode : public cocos2d::Node
|
|||
public:
|
||||
static BatchNode *create();
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
BatchNode();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -101,7 +101,7 @@ public:
|
|||
|
||||
/**
|
||||
* Add a child to this bone, and it will let this child call setParent(Bone *parent) function to set self to it's parent
|
||||
* @param child the child you want to add
|
||||
* @param child the child you want to add
|
||||
*/
|
||||
void addChildBone(Bone *child);
|
||||
|
||||
|
@ -130,7 +130,7 @@ public:
|
|||
|
||||
/**
|
||||
* Removes a child Bone
|
||||
* @param bone the bone you want to remove
|
||||
* @param bone the bone you want to remove
|
||||
*/
|
||||
void removeChildBone(Bone *bone, bool recursion);
|
||||
|
||||
|
@ -227,20 +227,20 @@ protected:
|
|||
DisplayManager *_displayManager;
|
||||
|
||||
/*
|
||||
* When Armature play an animation, if there is not a MovementBoneData of this bone in this MovementData, this bone will be hidden.
|
||||
* Set IgnoreMovementBoneData to true, then this bone will also be shown.
|
||||
* When Armature play an animation, if there is not a MovementBoneData of this bone in this MovementData, this bone will be hidden.
|
||||
* Set IgnoreMovementBoneData to true, then this bone will also be shown.
|
||||
*/
|
||||
bool _ignoreMovementBoneData;
|
||||
|
||||
cocos2d::BlendFunc _blendFunc;
|
||||
bool _blendDirty;
|
||||
|
||||
Tween *_tween; //! Calculate tween effect
|
||||
Tween *_tween; //! Calculate tween effect
|
||||
|
||||
//! Used for making tween effect in every frame
|
||||
FrameData *_tweenData;
|
||||
|
||||
Bone *_parentBone; //! A weak reference to its parent
|
||||
Bone *_parentBone; //! A weak reference to its parent
|
||||
bool _boneTransformDirty; //! Whether or not transform dirty
|
||||
|
||||
//! self Transform, use this to change display's state
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -137,7 +137,7 @@ public:
|
|||
static ColliderDetector *create();
|
||||
static ColliderDetector *create(Bone *bone);
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
ColliderDetector();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -59,16 +59,16 @@ public:
|
|||
* @lua NA
|
||||
*/
|
||||
virtual void onExit() override;
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual void onAdd() override;
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual void onRemove() override;
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual void onAdd() override;
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual void onRemove() override;
|
||||
virtual bool isEnabled() const override;
|
||||
virtual void setEnabled(bool b) override;
|
||||
virtual bool serialize(void* r) override;
|
||||
|
@ -108,8 +108,8 @@ public:
|
|||
void setLoop(bool bLoop);
|
||||
bool isLoop();
|
||||
private:
|
||||
std::string _filePath;
|
||||
bool _loop;
|
||||
std::string _filePath;
|
||||
bool _loop;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -56,44 +56,44 @@ class CC_STUDIO_DLL DataReaderHelper : cocos2d::Ref
|
|||
{
|
||||
protected:
|
||||
|
||||
enum ConfigType
|
||||
{
|
||||
DragonBone_XML,
|
||||
CocoStudio_JSON,
|
||||
enum ConfigType
|
||||
{
|
||||
DragonBone_XML,
|
||||
CocoStudio_JSON,
|
||||
CocoStudio_Binary
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct _AsyncStruct
|
||||
{
|
||||
std::string filename;
|
||||
std::string fileContent;
|
||||
ConfigType configType;
|
||||
std::string baseFilePath;
|
||||
cocos2d::Ref *target;
|
||||
cocos2d::SEL_SCHEDULE selector;
|
||||
bool autoLoadSpriteFile;
|
||||
typedef struct _AsyncStruct
|
||||
{
|
||||
std::string filename;
|
||||
std::string fileContent;
|
||||
ConfigType configType;
|
||||
std::string baseFilePath;
|
||||
cocos2d::Ref *target;
|
||||
cocos2d::SEL_SCHEDULE selector;
|
||||
bool autoLoadSpriteFile;
|
||||
|
||||
std::string imagePath;
|
||||
std::string plistPath;
|
||||
} AsyncStruct;
|
||||
} AsyncStruct;
|
||||
|
||||
typedef struct _DataInfo
|
||||
{
|
||||
AsyncStruct *asyncStruct;
|
||||
std::queue<std::string> configFileQueue;
|
||||
typedef struct _DataInfo
|
||||
{
|
||||
AsyncStruct *asyncStruct;
|
||||
std::queue<std::string> configFileQueue;
|
||||
float contentScale;
|
||||
std::string filename;
|
||||
std::string baseFilePath;
|
||||
float flashToolVersion;
|
||||
float cocoStudioVersion;
|
||||
} DataInfo;
|
||||
} DataInfo;
|
||||
|
||||
public:
|
||||
|
||||
/** @deprecated Use getInstance() instead */
|
||||
CC_DEPRECATED_ATTRIBUTE static DataReaderHelper *sharedDataReaderHelper() { return DataReaderHelper::getInstance(); }
|
||||
/** @deprecated Use getInstance() instead */
|
||||
CC_DEPRECATED_ATTRIBUTE static DataReaderHelper *sharedDataReaderHelper() { return DataReaderHelper::getInstance(); }
|
||||
|
||||
static DataReaderHelper *getInstance();
|
||||
static DataReaderHelper *getInstance();
|
||||
|
||||
/**
|
||||
* Scale the position data, used for multiresolution adapter
|
||||
|
@ -104,10 +104,10 @@ public:
|
|||
|
||||
static void purge();
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
DataReaderHelper();
|
||||
DataReaderHelper();
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
@ -179,48 +179,48 @@ public:
|
|||
|
||||
// for binary decode
|
||||
public:
|
||||
static void addDataFromBinaryCache(const char *fileContent, DataInfo *dataInfo = nullptr);
|
||||
static ArmatureData *decodeArmature(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static BoneData *decodeBone(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static DisplayData *decodeBoneDisplay(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static AnimationData *decodeAnimation(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static MovementData *decodeMovement(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static void addDataFromBinaryCache(const char *fileContent, DataInfo *dataInfo = nullptr);
|
||||
static ArmatureData *decodeArmature(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static BoneData *decodeBone(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static DisplayData *decodeBoneDisplay(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static AnimationData *decodeAnimation(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static MovementData *decodeMovement(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
|
||||
static MovementBoneData *decodeMovementBone(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static FrameData *decodeFrame(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static MovementBoneData *decodeMovementBone(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static FrameData *decodeFrame(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
|
||||
static TextureData *decodeTexture(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode);
|
||||
static ContourData *decodeContour(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode);
|
||||
static TextureData *decodeTexture(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode);
|
||||
static ContourData *decodeContour(CocoLoader *cocoLoader, stExpCocoNode *pCocoNode);
|
||||
|
||||
static void decodeNode(BaseData *node, CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
static void decodeNode(BaseData *node, CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, DataInfo *dataInfo);
|
||||
|
||||
protected:
|
||||
void loadData();
|
||||
void loadData();
|
||||
|
||||
|
||||
|
||||
|
||||
std::condition_variable _sleepCondition;
|
||||
std::condition_variable _sleepCondition;
|
||||
|
||||
std::thread *_loadingThread;
|
||||
std::thread *_loadingThread;
|
||||
|
||||
std::mutex _sleepMutex;
|
||||
std::mutex _sleepMutex;
|
||||
|
||||
std::mutex _asyncStructQueueMutex;
|
||||
std::mutex _dataInfoMutex;
|
||||
std::mutex _asyncStructQueueMutex;
|
||||
std::mutex _dataInfoMutex;
|
||||
|
||||
std::mutex _addDataMutex;
|
||||
std::mutex _addDataMutex;
|
||||
|
||||
std::mutex _getFileMutex;
|
||||
|
||||
|
||||
unsigned long _asyncRefCount;
|
||||
unsigned long _asyncRefTotalCount;
|
||||
|
||||
unsigned long _asyncRefCount;
|
||||
unsigned long _asyncRefTotalCount;
|
||||
|
||||
bool need_quit;
|
||||
bool need_quit;
|
||||
|
||||
std::queue<AsyncStruct *> *_asyncStructQueue;
|
||||
std::queue<DataInfo *> *_dataQueue;
|
||||
std::queue<AsyncStruct *> *_asyncStructQueue;
|
||||
std::queue<DataInfo *> *_dataQueue;
|
||||
|
||||
static std::vector<std::string> _configFileList;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -38,28 +38,28 @@ THE SOFTWARE.
|
|||
|
||||
#define CC_CREATE_NO_PARAM_NO_INIT(varType)\
|
||||
public: \
|
||||
static inline varType *create(void){ \
|
||||
varType *var = new varType();\
|
||||
if (var)\
|
||||
static inline varType *create(void){ \
|
||||
varType *var = new varType();\
|
||||
if (var)\
|
||||
{\
|
||||
var->autorelease();\
|
||||
return var;\
|
||||
var->autorelease();\
|
||||
return var;\
|
||||
}\
|
||||
CC_SAFE_DELETE(var);\
|
||||
return nullptr;\
|
||||
CC_SAFE_DELETE(var);\
|
||||
return nullptr;\
|
||||
}
|
||||
|
||||
#define CC_CREATE_NO_PARAM(varType)\
|
||||
public: \
|
||||
static inline varType *create(void){ \
|
||||
varType *var = new varType();\
|
||||
if (var && var->init())\
|
||||
static inline varType *create(void){ \
|
||||
varType *var = new varType();\
|
||||
if (var && var->init())\
|
||||
{\
|
||||
var->autorelease();\
|
||||
return var;\
|
||||
var->autorelease();\
|
||||
return var;\
|
||||
}\
|
||||
CC_SAFE_DELETE(var);\
|
||||
return nullptr;\
|
||||
CC_SAFE_DELETE(var);\
|
||||
return nullptr;\
|
||||
}
|
||||
|
||||
namespace cocostudio {
|
||||
|
@ -74,7 +74,7 @@ class CC_STUDIO_DLL BaseData : public cocos2d::Ref
|
|||
public:
|
||||
CC_CREATE_NO_PARAM_NO_INIT(BaseData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
BaseData();
|
||||
|
@ -101,9 +101,9 @@ public:
|
|||
virtual void setColor(const cocos2d::Color4B &color);
|
||||
virtual cocos2d::Color4B getColor();
|
||||
public:
|
||||
float x; //! position x attribute
|
||||
float y; //! position y attribute
|
||||
int zOrder; //! zorder attribute, used to order the Bone's depth order
|
||||
float x; //! position x attribute
|
||||
float y; //! position y attribute
|
||||
int zOrder; //! zorder attribute, used to order the Bone's depth order
|
||||
|
||||
/**
|
||||
* x y skewX skewY scaleX scaleY used to calculate transform matrix
|
||||
|
@ -145,7 +145,7 @@ public:
|
|||
|
||||
static const std::string changeDisplayToTexture(const std::string& displayName);
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
DisplayData();
|
||||
|
@ -157,7 +157,7 @@ public:
|
|||
|
||||
virtual void copy(DisplayData *displayData);
|
||||
|
||||
DisplayType displayType; //! mark which type your display is
|
||||
DisplayType displayType; //! mark which type your display is
|
||||
std::string displayName;
|
||||
};
|
||||
|
||||
|
@ -171,7 +171,7 @@ class CC_STUDIO_DLL SpriteDisplayData : public DisplayData
|
|||
public:
|
||||
CC_CREATE_NO_PARAM_NO_INIT(SpriteDisplayData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
SpriteDisplayData();
|
||||
|
@ -195,7 +195,7 @@ class CC_STUDIO_DLL ArmatureDisplayData : public DisplayData
|
|||
public:
|
||||
CC_CREATE_NO_PARAM_NO_INIT(ArmatureDisplayData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
ArmatureDisplayData();
|
||||
|
@ -215,7 +215,7 @@ class CC_STUDIO_DLL ParticleDisplayData : public DisplayData
|
|||
public:
|
||||
CC_CREATE_NO_PARAM_NO_INIT(ParticleDisplayData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
ParticleDisplayData();
|
||||
|
@ -240,7 +240,7 @@ class CC_STUDIO_DLL BoneData : public BaseData
|
|||
public:
|
||||
CC_CREATE_NO_PARAM(BoneData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
BoneData(void);
|
||||
|
@ -274,7 +274,7 @@ class CC_STUDIO_DLL ArmatureData : public cocos2d::Ref
|
|||
public:
|
||||
CC_CREATE_NO_PARAM(ArmatureData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
ArmatureData();
|
||||
|
@ -320,7 +320,7 @@ class CC_STUDIO_DLL FrameData : public BaseData
|
|||
public:
|
||||
CC_CREATE_NO_PARAM_NO_INIT(FrameData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
FrameData();
|
||||
|
@ -367,7 +367,7 @@ class CC_STUDIO_DLL MovementBoneData : public cocos2d::Ref
|
|||
public:
|
||||
CC_CREATE_NO_PARAM(MovementBoneData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
MovementBoneData();
|
||||
|
@ -399,7 +399,7 @@ class CC_STUDIO_DLL MovementData : public cocos2d::Ref
|
|||
public:
|
||||
CC_CREATE_NO_PARAM_NO_INIT(MovementData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
MovementData(void);
|
||||
|
@ -414,7 +414,7 @@ public:
|
|||
public:
|
||||
std::string name;
|
||||
int duration; //! the frames this movement will last
|
||||
float scale; //! scale this movement
|
||||
float scale; //! scale this movement
|
||||
|
||||
/**
|
||||
* Change to this movement will last durationTo frames. Use this effect can avoid too suddenly changing.
|
||||
|
@ -441,9 +441,9 @@ public:
|
|||
cocos2d::tweenfunc::TweenType tweenEasing;
|
||||
|
||||
/**
|
||||
* @brief save movment bone data
|
||||
* @key const std::string&
|
||||
* @value MovementBoneData *
|
||||
* @brief save movment bone data
|
||||
* @key const std::string&
|
||||
* @value MovementBoneData *
|
||||
*/
|
||||
cocos2d::Map<std::string, MovementBoneData*> movBoneDataDic;
|
||||
};
|
||||
|
@ -461,7 +461,7 @@ class CC_STUDIO_DLL AnimationData : public cocos2d::Ref
|
|||
public:
|
||||
CC_CREATE_NO_PARAM_NO_INIT(AnimationData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
AnimationData(void);
|
||||
|
@ -492,7 +492,7 @@ class CC_STUDIO_DLL ContourData : public cocos2d::Ref
|
|||
public:
|
||||
CC_CREATE_NO_PARAM(ContourData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
ContourData();
|
||||
|
@ -505,7 +505,7 @@ public:
|
|||
virtual bool init();
|
||||
virtual void addVertex(cocos2d::Vec2 &vertex);
|
||||
public:
|
||||
std::vector<cocos2d::Vec2> vertexList; //! Save contour vertex info, vertex saved in a Vec2
|
||||
std::vector<cocos2d::Vec2> vertexList; //! Save contour vertex info, vertex saved in a Vec2
|
||||
};
|
||||
|
||||
|
||||
|
@ -521,7 +521,7 @@ class CC_STUDIO_DLL TextureData : public cocos2d::Ref
|
|||
public:
|
||||
CC_CREATE_NO_PARAM(TextureData)
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
TextureData();
|
||||
|
@ -537,13 +537,13 @@ public:
|
|||
ContourData *getContourData(int index);
|
||||
public:
|
||||
|
||||
float height; //! The texture's width, height
|
||||
float height; //! The texture's width, height
|
||||
float width;
|
||||
|
||||
float pivotX; //! The texture's anchor point
|
||||
float pivotX; //! The texture's anchor point
|
||||
float pivotY;
|
||||
|
||||
std::string name; //! The texture's name
|
||||
std::string name; //! The texture's name
|
||||
|
||||
cocos2d::Vector<ContourData*> contourDataList;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -61,11 +61,11 @@ public:
|
|||
* If index already have a display, then replace it.
|
||||
* If index is current display index, then also change display to _index
|
||||
*
|
||||
* @param displayData it include the display information, like DisplayType.
|
||||
* If you want to create a sprite display, then create a SpriteDisplayData param
|
||||
* @param displayData it include the display information, like DisplayType.
|
||||
* If you want to create a sprite display, then create a SpriteDisplayData param
|
||||
*
|
||||
* @param index the index of the display you want to replace or add to
|
||||
* -1 : append display from back
|
||||
* @param index the index of the display you want to replace or add to
|
||||
* -1 : append display from back
|
||||
*/
|
||||
void addDisplay(DisplayData *displayData, int index);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2015 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -44,7 +44,7 @@ namespace cocostudio {
|
|||
class CC_STUDIO_DLL SpriteFrameCacheHelper
|
||||
{
|
||||
public:
|
||||
/** @deprecated Use getInstance() instead */
|
||||
/** @deprecated Use getInstance() instead */
|
||||
CC_DEPRECATED_ATTRIBUTE static SpriteFrameCacheHelper *sharedSpriteFrameCacheHelper(){ return SpriteFrameCacheHelper::getInstance(); }
|
||||
|
||||
static SpriteFrameCacheHelper *getInstance();
|
||||
|
@ -53,7 +53,7 @@ public:
|
|||
public:
|
||||
|
||||
/**
|
||||
* @brief Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name
|
||||
* @brief Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name
|
||||
*/
|
||||
void addSpriteFrameFromFile(const std::string& plistPath, const std::string& imagePath);
|
||||
void removeSpriteFrameFromFile(const std::string& plistPath);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -140,7 +140,7 @@ protected:
|
|||
int _totalDuration;
|
||||
|
||||
|
||||
int _fromIndex; //! The current frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex
|
||||
int _fromIndex; //! The current frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex
|
||||
int _toIndex; //! The next frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex
|
||||
|
||||
ArmatureAnimation *_animation;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __CCCOCOSSTUDIO_H__
|
||||
#ifndef __CCCOCOSSTUDIO_H__
|
||||
#define __CCCOCOSSTUDIO_H__
|
||||
|
||||
#if (defined(WIN32) && defined(_WINDOWS)) || defined(WINRT) || defined(WP8)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
@ -44,7 +44,7 @@ namespace cocostudio
|
|||
static void destroyInstance();
|
||||
|
||||
virtual void setPropsFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options);
|
||||
virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) ;
|
||||
virtual void setPropsFromBinary(cocos2d::ui::Widget* widget, CocoLoader* cocoLoader, stExpCocoNode* pCocoNode) ;
|
||||
flatbuffers::Offset<flatbuffers::Table> createOptionsWithFlatBuffers(const tinyxml2::XMLElement* objectData,
|
||||
flatbuffers::FlatBufferBuilder* builder);
|
||||
void setPropsWithFlatBuffers(cocos2d::Node* node, const flatbuffers::Table* scrollViewOptions);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
|
Loading…
Reference in New Issue