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("")
|
||||
, mSequenceId(0)
|
||||
, mChainedSequenceId(0)
|
||||
, mCallbackChannel(NULL)
|
||||
, mSoundChannel(NULL)
|
||||
{}
|
||||
|
||||
CCBSequence::~CCBSequence() {
|
||||
CC_SAFE_RELEASE(mCallbackChannel);
|
||||
CC_SAFE_RELEASE(mSoundChannel);
|
||||
}
|
||||
|
||||
float CCBSequence::getDuration()
|
||||
{
|
||||
return mDuration;
|
||||
|
@ -50,7 +57,9 @@ CCBSequenceProperty* CCBSequence::getCallbackChannel()
|
|||
|
||||
void CCBSequence::setCallbackChannel(CCBSequenceProperty* callbackChannel)
|
||||
{
|
||||
CC_SAFE_RELEASE(mCallbackChannel);
|
||||
mCallbackChannel = callbackChannel;
|
||||
CC_SAFE_RETAIN(mCallbackChannel);
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,7 +70,9 @@ CCBSequenceProperty* CCBSequence::getSoundChannel()
|
|||
|
||||
void CCBSequence::setSoundChannel(CCBSequenceProperty* soundChannel)
|
||||
{
|
||||
mSoundChannel = mCallbackChannel;
|
||||
CC_SAFE_RELEASE(mSoundChannel);
|
||||
mSoundChannel = soundChannel;
|
||||
CC_SAFE_RETAIN(mSoundChannel);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ private:
|
|||
|
||||
public:
|
||||
CCBSequence();
|
||||
|
||||
~CCBSequence();
|
||||
float getDuration();
|
||||
void setDuration(float fDuration);
|
||||
|
||||
|
|
Loading…
Reference in New Issue