Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into cocos-console-test

This commit is contained in:
andyque 2014-03-20 10:43:31 +08:00
commit 6b042d26da
311 changed files with 374 additions and 8 deletions

View File

@ -1 +1 @@
c99c8d91b20225c59166c37ca68977a127181872
474442e74e1b39c748e79eceb26039d513d9a715

View File

@ -1491,12 +1491,22 @@ ScaleTo* ScaleTo::create(float duration, float sx, float sy)
return scaleTo;
}
ScaleTo* ScaleTo::create(float duration, float sx, float sy, float sz)
{
ScaleTo *scaleTo = new ScaleTo();
scaleTo->initWithDuration(duration, sx, sy, sz);
scaleTo->autorelease();
return scaleTo;
}
bool ScaleTo::initWithDuration(float duration, float s)
{
if (ActionInterval::initWithDuration(duration))
{
_endScaleX = s;
_endScaleY = s;
_endScaleZ = s;
return true;
}
@ -1510,6 +1520,21 @@ bool ScaleTo::initWithDuration(float duration, float sx, float sy)
{
_endScaleX = sx;
_endScaleY = sy;
_endScaleZ = 1.f;
return true;
}
return false;
}
bool ScaleTo::initWithDuration(float duration, float sx, float sy, float sz)
{
if (ActionInterval::initWithDuration(duration))
{
_endScaleX = sx;
_endScaleY = sy;
_endScaleZ = sz;
return true;
}
@ -1521,7 +1546,7 @@ ScaleTo* ScaleTo::clone(void) const
{
// no copy constructor
auto a = new ScaleTo();
a->initWithDuration(_duration, _endScaleX, _endScaleY);
a->initWithDuration(_duration, _endScaleX, _endScaleY, _endScaleZ);
a->autorelease();
return a;
}
@ -1538,8 +1563,10 @@ void ScaleTo::startWithTarget(Node *target)
ActionInterval::startWithTarget(target);
_startScaleX = target->getScaleX();
_startScaleY = target->getScaleY();
_startScaleZ = target->getScaleZ();
_deltaX = _endScaleX - _startScaleX;
_deltaY = _endScaleY - _startScaleY;
_deltaZ = _endScaleZ - _startScaleZ;
}
void ScaleTo::update(float time)
@ -1548,6 +1575,7 @@ void ScaleTo::update(float time)
{
_target->setScaleX(_startScaleX + _deltaX * time);
_target->setScaleY(_startScaleY + _deltaY * time);
_target->setScaleZ(_startScaleZ + _deltaZ * time);
}
}
@ -1567,7 +1595,16 @@ ScaleBy* ScaleBy::create(float duration, float s)
ScaleBy* ScaleBy::create(float duration, float sx, float sy)
{
ScaleBy *scaleBy = new ScaleBy();
scaleBy->initWithDuration(duration, sx, sy);
scaleBy->initWithDuration(duration, sx, sy, 1.f);
scaleBy->autorelease();
return scaleBy;
}
ScaleBy* ScaleBy::create(float duration, float sx, float sy, float sz)
{
ScaleBy *scaleBy = new ScaleBy();
scaleBy->initWithDuration(duration, sx, sy, sz);
scaleBy->autorelease();
return scaleBy;
@ -1577,7 +1614,7 @@ ScaleBy* ScaleBy::clone(void) const
{
// no copy constructor
auto a = new ScaleBy();
a->initWithDuration(_duration, _endScaleX, _endScaleY);
a->initWithDuration(_duration, _endScaleX, _endScaleY, _endScaleZ);
a->autorelease();
return a;
}
@ -1587,11 +1624,12 @@ void ScaleBy::startWithTarget(Node *target)
ScaleTo::startWithTarget(target);
_deltaX = _startScaleX * _endScaleX - _startScaleX;
_deltaY = _startScaleY * _endScaleY - _startScaleY;
_deltaZ = _startScaleZ * _endScaleZ - _startScaleZ;
}
ScaleBy* ScaleBy::reverse() const
{
return ScaleBy::create(_duration, 1 / _endScaleX, 1 / _endScaleY);
return ScaleBy::create(_duration, 1 / _endScaleX, 1 / _endScaleY, 1/ _endScaleZ);
}
//

View File

@ -622,6 +622,9 @@ public:
/** creates the action with and X factor and a Y factor */
static ScaleTo* create(float duration, float sx, float sy);
/** creates the action with X Y Z factor */
static ScaleTo* create(float duration, float sx, float sy, float sz);
//
// Overrides
//
@ -637,15 +640,21 @@ protected:
bool initWithDuration(float duration, float s);
/** initializes the action with and X factor and a Y factor */
bool initWithDuration(float duration, float sx, float sy);
/** initializes the action with X Y Z factor */
bool initWithDuration(float duration, float sx, float sy, float sz);
float _scaleX;
float _scaleY;
float _scaleZ;
float _startScaleX;
float _startScaleY;
float _startScaleZ;
float _endScaleX;
float _endScaleY;
float _endScaleZ;
float _deltaX;
float _deltaY;
float _deltaZ;
private:
CC_DISALLOW_COPY_AND_ASSIGN(ScaleTo);
@ -662,6 +671,9 @@ public:
/** creates the action with and X factor and a Y factor */
static ScaleBy* create(float duration, float sx, float sy);
/** creates the action with X Y Z factor */
static ScaleBy* create(float duration, float sx, float sy, float sz);
//
// Overrides
//

View File

@ -742,7 +742,11 @@ void FileUtils::setSearchResolutionsOrder(const std::vector<std::string>& search
void FileUtils::addSearchResolutionsOrder(const std::string &order)
{
_searchResolutionsOrderArray.push_back(order);
std::string resOrder = order;
if (!resOrder.empty() && resOrder[resOrder.length()-1] != '/')
resOrder.append("/");
_searchResolutionsOrderArray.push_back(resOrder);
}
const std::vector<std::string>& FileUtils::getSearchResolutionsOrder()

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module Action
-- @extend Ref
--------------------------------
-- @function [parent=#Action] startWithTarget

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ActionCamera
-- @extend ActionInterval
--------------------------------
-- overload function: setEye(float, float, float)

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ActionEase
-- @extend ActionInterval
--------------------------------
-- @function [parent=#ActionEase] getInnerAction

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ActionInstant
-- @extend FiniteTimeAction
--------------------------------
-- @function [parent=#ActionInstant] step

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ActionInterval
-- @extend FiniteTimeAction
--------------------------------
-- @function [parent=#ActionInterval] getAmplitudeRate

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ActionManager
-- @extend Ref
--------------------------------
-- @function [parent=#ActionManager] getActionByTag

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ActionTween
-- @extend ActionInterval
--------------------------------
-- @function [parent=#ActionTween] initWithDuration

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module Animate
-- @extend ActionInterval
--------------------------------
-- overload function: getAnimation()

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module Animation
-- @extend Ref
--------------------------------
-- @function [parent=#Animation] getLoops

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module AnimationCache
-- @extend Ref
--------------------------------
-- @function [parent=#AnimationCache] getAnimation

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module AnimationFrame
-- @extend Ref
--------------------------------
-- @function [parent=#AnimationFrame] setSpriteFrame

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module Armature
-- @extend Node,BlendProtocol,
--------------------------------
-- @function [parent=#Armature] getBone

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ArmatureDisplayData
-- @extend DisplayData
--------------------------------
-- @function [parent=#ArmatureDisplayData] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module AssetsManager
-- @extend Node
--------------------------------
-- @function [parent=#AssetsManager] setStoragePath

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module AtlasNode
-- @extend Node,TextureProtocol,
--------------------------------
-- @function [parent=#AtlasNode] updateAtlasValues

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module BatchNode
-- @extend Node
--------------------------------
-- @function [parent=#BatchNode] init

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module BezierBy
-- @extend ActionInterval
--------------------------------
-- @function [parent=#BezierBy] startWithTarget

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module BezierTo
-- @extend BezierBy
--------------------------------
-- @function [parent=#BezierTo] startWithTarget

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module Blink
-- @extend ActionInterval
--------------------------------
-- @function [parent=#Blink] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module Bone
-- @extend Node
--------------------------------
-- @function [parent=#Bone] isTransformDirty

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module BoneData
-- @extend BaseData
--------------------------------
-- @function [parent=#BoneData] getDisplayData

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module Button
-- @extend Widget
--------------------------------
-- @function [parent=#Button] getTitleText

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module CallFunc
-- @extend ActionInstant
--------------------------------
-- @function [parent=#CallFunc] execute

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module CardinalSplineBy
-- @extend CardinalSplineTo
--------------------------------
-- @function [parent=#CardinalSplineBy] startWithTarget

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module CardinalSplineTo
-- @extend ActionInterval
--------------------------------
-- @function [parent=#CardinalSplineTo] getPoints

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module CatmullRomBy
-- @extend CardinalSplineBy
--------------------------------
-- @function [parent=#CatmullRomBy] initWithDuration

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module CatmullRomTo
-- @extend CardinalSplineTo
--------------------------------
-- @function [parent=#CatmullRomTo] initWithDuration

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module CheckBox
-- @extend Widget
--------------------------------
-- @function [parent=#CheckBox] getSelectedState

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ClippingNode
-- @extend Node
--------------------------------
-- @function [parent=#ClippingNode] isInverted

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ComAttribute
-- @extend Component
--------------------------------
-- @function [parent=#ComAttribute] getFloat

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ComAudio
-- @extend Component
--------------------------------
-- @function [parent=#ComAudio] stopAllEffects

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ComController
-- @extend Component,InputDelegate,
--------------------------------
-- @function [parent=#ComController] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ComRender
-- @extend Component
--------------------------------
-- @function [parent=#ComRender] setNode

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module Component
-- @extend Ref
--------------------------------
-- @function [parent=#Component] setEnabled

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module Control
-- @extend Layer
--------------------------------
-- @function [parent=#Control] setEnabled

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ControlButton
-- @extend Control
--------------------------------
-- @function [parent=#ControlButton] isPushed

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ControlColourPicker
-- @extend Control
--------------------------------
-- @function [parent=#ControlColourPicker] setEnabled

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ControlHuePicker
-- @extend Control
--------------------------------
-- @function [parent=#ControlHuePicker] setEnabled

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ControlPotentiometer
-- @extend Control
--------------------------------
-- @function [parent=#ControlPotentiometer] setPreviousLocation

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ControlSaturationBrightnessPicker
-- @extend Control
--------------------------------
-- @function [parent=#ControlSaturationBrightnessPicker] getShadow

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ControlSlider
-- @extend Control
--------------------------------
-- @function [parent=#ControlSlider] getSelectedThumbSprite

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ControlStepper
-- @extend Control
--------------------------------
-- @function [parent=#ControlStepper] setMinusSprite

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module ControlSwitch
-- @extend Control
--------------------------------
-- @function [parent=#ControlSwitch] setEnabled

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module DelayTime
-- @extend ActionInterval
--------------------------------
-- @function [parent=#DelayTime] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module DrawNode
-- @extend Node
--------------------------------
-- @function [parent=#DrawNode] drawQuadraticBezier

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseBackIn
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseBackIn] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseBackInOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseBackInOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseBackOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseBackOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseBezierAction
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseBezierAction] setBezierParamer

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseBounce
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseBounce] clone

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseBounceIn
-- @extend EaseBounce
--------------------------------
-- @function [parent=#EaseBounceIn] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseBounceInOut
-- @extend EaseBounce
--------------------------------
-- @function [parent=#EaseBounceInOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseBounceOut
-- @extend EaseBounce
--------------------------------
-- @function [parent=#EaseBounceOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseCircleActionIn
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseCircleActionIn] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseCircleActionInOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseCircleActionInOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseCircleActionOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseCircleActionOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseCubicActionIn
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseCubicActionIn] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseCubicActionInOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseCubicActionInOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseCubicActionOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseCubicActionOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseElastic
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseElastic] setPeriod

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseElasticIn
-- @extend EaseElastic
--------------------------------
-- overload function: create(cc.ActionInterval)

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseElasticInOut
-- @extend EaseElastic
--------------------------------
-- overload function: create(cc.ActionInterval)

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseElasticOut
-- @extend EaseElastic
--------------------------------
-- overload function: create(cc.ActionInterval)

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseExponentialIn
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseExponentialIn] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseExponentialInOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseExponentialInOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseExponentialOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseExponentialOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseIn
-- @extend EaseRateAction
--------------------------------
-- @function [parent=#EaseIn] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseInOut
-- @extend EaseRateAction
--------------------------------
-- @function [parent=#EaseInOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseOut
-- @extend EaseRateAction
--------------------------------
-- @function [parent=#EaseOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseQuadraticActionIn
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseQuadraticActionIn] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseQuadraticActionInOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseQuadraticActionInOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseQuadraticActionOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseQuadraticActionOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseQuarticActionIn
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseQuarticActionIn] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseQuarticActionInOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseQuarticActionInOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseQuarticActionOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseQuarticActionOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseQuinticActionIn
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseQuinticActionIn] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseQuinticActionInOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseQuinticActionInOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseQuinticActionOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseQuinticActionOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseRateAction
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseRateAction] setRate

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseSineIn
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseSineIn] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseSineInOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseSineInOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EaseSineOut
-- @extend ActionEase
--------------------------------
-- @function [parent=#EaseSineOut] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EditBox
-- @extend ControlButton,IMEDelegate,
--------------------------------
-- @function [parent=#EditBox] getText

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module Event
-- @extend Ref
--------------------------------
-- @function [parent=#Event] isStopped

View File

@ -1,5 +1,6 @@
--------------------------------
-- @module EventAcceleration
-- @extend Event
return nil

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EventCustom
-- @extend Event
--------------------------------
-- @function [parent=#EventCustom] getEventName

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EventDispatcher
-- @extend Ref
--------------------------------
-- @function [parent=#EventDispatcher] pauseEventListenersForTarget

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EventKeyboard
-- @extend Event
--------------------------------
-- @function [parent=#EventKeyboard] EventKeyboard

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EventListener
-- @extend Ref
--------------------------------
-- @function [parent=#EventListener] clone

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EventListenerAcceleration
-- @extend EventListener
--------------------------------
-- @function [parent=#EventListenerAcceleration] clone

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EventListenerCustom
-- @extend EventListener
--------------------------------
-- @function [parent=#EventListenerCustom] clone

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EventListenerKeyboard
-- @extend EventListener
--------------------------------
-- @function [parent=#EventListenerKeyboard] clone

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EventListenerMouse
-- @extend EventListener
--------------------------------
-- @function [parent=#EventListenerMouse] clone

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EventListenerPhysicsContact
-- @extend EventListenerCustom
--------------------------------
-- @function [parent=#EventListenerPhysicsContact] create

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EventListenerPhysicsContactWithBodies
-- @extend EventListenerPhysicsContact
--------------------------------
-- @function [parent=#EventListenerPhysicsContactWithBodies] hitTest

View File

@ -1,6 +1,7 @@
--------------------------------
-- @module EventListenerPhysicsContactWithGroup
-- @extend EventListenerPhysicsContact
--------------------------------
-- @function [parent=#EventListenerPhysicsContactWithGroup] hitTest

Some files were not shown because too many files have changed in this diff Show More