mirror of https://github.com/axmolengine/axmol.git
Modifyign CCBSequence to do proper copy of objects
This commit is contained in:
parent
9acaaa289a
commit
035c0d7eee
|
@ -11,8 +11,15 @@ CCBSequence::CCBSequence()
|
||||||
, mName("")
|
, mName("")
|
||||||
, mSequenceId(0)
|
, mSequenceId(0)
|
||||||
, mChainedSequenceId(0)
|
, mChainedSequenceId(0)
|
||||||
|
, mCallbackChannel(NULL)
|
||||||
|
, mSoundChannel(NULL)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
CCBSequence::~CCBSequence() {
|
||||||
|
CC_SAFE_RELEASE(mCallbackChannel);
|
||||||
|
CC_SAFE_RELEASE(mSoundChannel);
|
||||||
|
}
|
||||||
|
|
||||||
float CCBSequence::getDuration()
|
float CCBSequence::getDuration()
|
||||||
{
|
{
|
||||||
return mDuration;
|
return mDuration;
|
||||||
|
@ -50,7 +57,9 @@ CCBSequenceProperty* CCBSequence::getCallbackChannel()
|
||||||
|
|
||||||
void CCBSequence::setCallbackChannel(CCBSequenceProperty* callbackChannel)
|
void CCBSequence::setCallbackChannel(CCBSequenceProperty* callbackChannel)
|
||||||
{
|
{
|
||||||
|
CC_SAFE_RELEASE(mCallbackChannel);
|
||||||
mCallbackChannel = callbackChannel;
|
mCallbackChannel = callbackChannel;
|
||||||
|
CC_SAFE_RETAIN(mCallbackChannel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,7 +70,9 @@ CCBSequenceProperty* CCBSequence::getSoundChannel()
|
||||||
|
|
||||||
void CCBSequence::setSoundChannel(CCBSequenceProperty* soundChannel)
|
void CCBSequence::setSoundChannel(CCBSequenceProperty* soundChannel)
|
||||||
{
|
{
|
||||||
mSoundChannel = mCallbackChannel;
|
CC_SAFE_RELEASE(mSoundChannel);
|
||||||
|
mSoundChannel = soundChannel;
|
||||||
|
CC_SAFE_RETAIN(mSoundChannel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CCBSequence();
|
CCBSequence();
|
||||||
|
~CCBSequence();
|
||||||
float getDuration();
|
float getDuration();
|
||||||
void setDuration(float fDuration);
|
void setDuration(float fDuration);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue