remove warning

This commit is contained in:
yangxiao 2014-08-26 14:19:08 +08:00
parent e09d705280
commit 7ff75fb397
1 changed files with 6 additions and 4 deletions

View File

@ -96,17 +96,19 @@ void Animate3D::startWithTarget(Node *target)
_boneCurves.clear(); _boneCurves.clear();
auto skin = sprite->getSkeleton(); auto skin = sprite->getSkeleton();
bool hasCurve = false;
for (unsigned int i = 0; i < skin->getBoneCount(); i++) { for (unsigned int i = 0; i < skin->getBoneCount(); i++) {
auto bone = skin->getBoneByIndex(i); auto bone = skin->getBoneByIndex(i);
auto curve = _animation->getBoneCurveByName(bone->getName()); auto curve = _animation->getBoneCurveByName(bone->getName());
if (curve) if (curve)
{ {
_boneCurves[bone] = curve; _boneCurves[bone] = curve;
hasCurve = true;
} }
else }
{ if (!hasCurve)
CCLOG("warning: bone %s not find in animation", bone->getName().c_str()); {
} CCLOG("warning: no animation finde for the skeleton");
} }
} }