mirror of https://github.com/axmolengine/axmol.git
fix compile error
This commit is contained in:
parent
25196072f2
commit
b076711b69
|
@ -56,7 +56,7 @@ void ColliderFilter::updateShape(b2Fixture *fixture)
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif ENABLE_PHYSICS_CHIPMUNK_DETECT
|
#elif ENABLE_PHYSICS_CHIPMUNK_DETECT
|
||||||
ColliderFilter::ColliderFilter(cpCollisionType collisionType, cpGroup group)
|
ColliderFilter::ColliderFilter(uintptr_t collisionType, uintptr_t group)
|
||||||
: _collisionType(collisionType)
|
: _collisionType(collisionType)
|
||||||
, _group(group)
|
, _group(group)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,6 @@ THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
#if ENABLE_PHYSICS_CHIPMUNK_DETECT
|
#if ENABLE_PHYSICS_CHIPMUNK_DETECT
|
||||||
#include "chipmunk.h"
|
|
||||||
struct cpBody;
|
struct cpBody;
|
||||||
struct cpShape;
|
struct cpShape;
|
||||||
#elif ENABLE_PHYSICS_BOX2D_DETECT
|
#elif ENABLE_PHYSICS_BOX2D_DETECT
|
||||||
|
@ -62,11 +61,11 @@ protected:
|
||||||
CC_SYNTHESIZE(signed short, _groupIndex, GroupIndex);
|
CC_SYNTHESIZE(signed short, _groupIndex, GroupIndex);
|
||||||
#elif ENABLE_PHYSICS_CHIPMUNK_DETECT
|
#elif ENABLE_PHYSICS_CHIPMUNK_DETECT
|
||||||
public:
|
public:
|
||||||
ColliderFilter(cpCollisionType collisionType = 0, cpGroup group = 0);
|
ColliderFilter(uintptr_t collisionType = 0, uintptr_t group = 0);
|
||||||
void updateShape(cpShape *shape);
|
void updateShape(cpShape *shape);
|
||||||
protected:
|
protected:
|
||||||
CC_SYNTHESIZE(cpCollisionType, _collisionType, CollisionType);
|
CC_SYNTHESIZE(uintptr_t, _collisionType, CollisionType);
|
||||||
CC_SYNTHESIZE(cpGroup, _group, Group);
|
CC_SYNTHESIZE(uintptr_t, _group, Group);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1008,7 +1008,8 @@ void TestColliderDetector::initWorld()
|
||||||
cpSpaceAddBody(space, body);
|
cpSpaceAddBody(space, body);
|
||||||
armature2->setBody(body);
|
armature2->setBody(body);
|
||||||
|
|
||||||
armature2->setColliderFilter(&ColliderFilter(eEnemyTag));
|
ColliderFilter filter = ColliderFilter(eEnemyTag);
|
||||||
|
armature2->setColliderFilter(&filter);
|
||||||
|
|
||||||
cpSpaceAddCollisionHandler(space, eEnemyTag, eBulletTag, beginHit, NULL, NULL, endHit, NULL);
|
cpSpaceAddCollisionHandler(space, eEnemyTag, eBulletTag, beginHit, NULL, NULL, endHit, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue