mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' of https://github.com/2youyouo2/cocos2d-x into develop
This commit is contained in:
commit
0bb8714f86
|
@ -69,9 +69,6 @@ ArmatureAnimation::~ArmatureAnimation(void)
|
|||
{
|
||||
CC_SAFE_RELEASE_NULL(_tweenList);
|
||||
CC_SAFE_RELEASE_NULL(_animationData);
|
||||
|
||||
CC_SAFE_RELEASE_NULL(_movementEventTarget);
|
||||
CC_SAFE_RELEASE_NULL(_frameEventTarget);
|
||||
}
|
||||
|
||||
bool ArmatureAnimation::init(Armature *armature)
|
||||
|
@ -423,23 +420,13 @@ std::string ArmatureAnimation::getCurrentMovementID() const
|
|||
|
||||
void ArmatureAnimation::setMovementEventCallFunc(Object *target, SEL_MovementEventCallFunc callFunc)
|
||||
{
|
||||
if (target != _movementEventTarget)
|
||||
{
|
||||
CC_SAFE_RETAIN(target);
|
||||
CC_SAFE_RELEASE_NULL(_movementEventTarget);
|
||||
_movementEventTarget = target;
|
||||
}
|
||||
_movementEventTarget = target;
|
||||
_movementEventCallFunc = callFunc;
|
||||
}
|
||||
|
||||
void ArmatureAnimation::setFrameEventCallFunc(Object *target, SEL_FrameEventCallFunc callFunc)
|
||||
{
|
||||
if (target != _frameEventTarget)
|
||||
{
|
||||
CC_SAFE_RETAIN(target);
|
||||
CC_SAFE_RELEASE_NULL(_frameEventTarget);
|
||||
_frameEventTarget = target;
|
||||
}
|
||||
_frameEventTarget = target;
|
||||
_frameEventCallFunc = callFunc;
|
||||
}
|
||||
|
||||
|
|
|
@ -142,8 +142,26 @@ void DisplayManager::addDisplay(Node *display, int index)
|
|||
}
|
||||
else
|
||||
{
|
||||
BaseData baseData;
|
||||
skin->setSkinData(baseData);
|
||||
bool find = false;
|
||||
|
||||
for (int i = _decoDisplayList->count()-2; i>=0; i--)
|
||||
{
|
||||
DecorativeDisplay *dd = static_cast<DecorativeDisplay*>(_decoDisplayList->objectAtIndex(i));
|
||||
SpriteDisplayData *spriteDisplayData = static_cast<SpriteDisplayData*>(dd->getDisplayData());
|
||||
if (spriteDisplayData)
|
||||
{
|
||||
find = true;
|
||||
skin->setSkinData(spriteDisplayData->skinData);
|
||||
static_cast<SpriteDisplayData*>(displayData)->skinData = spriteDisplayData->skinData;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!find)
|
||||
{
|
||||
BaseData baseData;
|
||||
skin->setSkinData(baseData);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (dynamic_cast<ParticleSystemQuad *>(display))
|
||||
|
|
Loading…
Reference in New Issue