mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of https://github.com/super626/cocos2d-x into v3
This commit is contained in:
commit
c1fd9adebf
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
};
|
};
|
||||||
|
|
|
@ -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 \
|
||||||
|
|
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue