This commit is contained in:
lvlong 2014-06-17 13:59:25 +08:00
commit c1fd9adebf
4 changed files with 9 additions and 21 deletions

View File

@ -75,20 +75,6 @@ Animation3D::~Animation3D()
for (auto itor : _boneCurves) { for (auto itor : _boneCurves) {
CC_SAFE_DELETE(itor.second); CC_SAFE_DELETE(itor.second);
} }
// for (auto itor : _boneTransCurves) {
// CC_SAFE_RELEASE(itor.second);
// }
// _boneTransCurves.clear();
//
// for (auto itor : _boneRotCurves) {
// CC_SAFE_RELEASE(itor.second);
// }
// _boneRotCurves.clear();
//
// for (auto itor : _boneScaleCurves) {
// CC_SAFE_RELEASE(itor.second);
// }
// _boneScaleCurves.clear();
} }
Animation3D::Curve::Curve() Animation3D::Curve::Curve()

View File

@ -71,9 +71,6 @@ protected:
std::unordered_map<std::string, Curve*> _boneCurves;//bone curves map, key bone name, value AnimationCurve std::unordered_map<std::string, Curve*> _boneCurves;//bone curves map, key bone name, value AnimationCurve
// std::unordered_map<std::string, AnimationCurveVec3*> _boneTransCurves;
// std::unordered_map<std::string, AnimationCurveQuat*> _boneRotCurves;
// std::unordered_map<std::string, AnimationCurveVec3*> _boneScaleCurves;
float _duration; //animation duration float _duration; //animation duration
}; };

View File

@ -189,13 +189,13 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \
LOCAL_C_INCLUDES := $(LOCAL_PATH) \ LOCAL_C_INCLUDES := $(LOCAL_PATH) \
$(LOCAL_PATH)/. \ $(LOCAL_PATH)/. \
$(LOCAL_PATH)/platform/android \ $(LOCAL_PATH)/platform/android \
$(LOCAL_PATH)/../external \
$(LOCAL_PATH)/../external/tinyxml2 \ $(LOCAL_PATH)/../external/tinyxml2 \
$(LOCAL_PATH)/../external/unzip \ $(LOCAL_PATH)/../external/unzip \
$(LOCAL_PATH)/../external/chipmunk/include/chipmunk \ $(LOCAL_PATH)/../external/chipmunk/include/chipmunk \
$(LOCAL_PATH)/../external/edtaa3func \ $(LOCAL_PATH)/../external/edtaa3func \
$(LOCAL_PATH)/../external/xxhash \ $(LOCAL_PATH)/../external/xxhash \
$(LOCAL_PATH)/../external/ConvertUTF \ $(LOCAL_PATH)/../external/ConvertUTF
$(LOCAL_PATH)/../external/json
LOCAL_LDLIBS := -lGLESv2 \ LOCAL_LDLIBS := -lGLESv2 \

View File

@ -555,9 +555,14 @@ void Sprite3DWithSkinTest::addNewSpriteWithCoords(Vec2 p)
animate->setPlayBack(true); animate->setPlayBack(true);
} }
if(std::rand() % 3 == 0) int rand2 = std::rand();
if(rand2 % 3 == 1)
{ {
animate->setSpeed(animate->getSpeed() * (std::rand() % 10)); animate->setSpeed(animate->getSpeed() + CCRANDOM_0_1());
}
else if(rand2 % 3 == 2)
{
animate->setSpeed(animate->getSpeed() - 0.5 * CCRANDOM_0_1());
} }
sprite->runAction(RepeatForever::create(animate)); sprite->runAction(RepeatForever::create(animate));