mirror of https://github.com/axmolengine/axmol.git
Fixed compile error when I turned off physics definitions.
Fixed the following compile error. cocos2d\extensions\physics-nodes\ccphysicssprite.cpp(305): error C4716: 'cocos2d::extension::PhysicsSprite::getRotation' : must return a value and more.. Conditions: CC_USE_PHYSICS = 0 CC_ENABLE_CHIPMUNK_INTEGRATION = 0 CC_ENABLE_BOX2D_INTEGRATION = 0
This commit is contained in:
parent
427c4e25af
commit
c527d7476b
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "CCPhysicsSprite.h"
|
||||
|
||||
#if CC_USE_PHYSICS
|
||||
|
||||
#if (CC_ENABLE_CHIPMUNK_INTEGRATION && CC_ENABLE_BOX2D_INTEGRATION)
|
||||
#error "Either Chipmunk or Box2d should be enabled, but not both at the same time"
|
||||
#endif
|
||||
|
@ -408,3 +410,5 @@ void PhysicsSprite::draw(Renderer *renderer, const Mat4 &transform, uint32_t fla
|
|||
}
|
||||
|
||||
NS_CC_EXT_END
|
||||
|
||||
#endif // CC_USE_PHYSICS
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
#ifndef __PHYSICSNODES_CCPHYSICSSPRITE_H__
|
||||
#define __PHYSICSNODES_CCPHYSICSSPRITE_H__
|
||||
|
||||
#include "base/ccConfig.h"
|
||||
#if CC_USE_PHYSICS
|
||||
|
||||
#include "2d/CCSprite.h"
|
||||
#include "extensions/ExtensionMacros.h"
|
||||
#include "extensions/ExtensionExport.h"
|
||||
|
@ -135,4 +138,6 @@ protected:
|
|||
|
||||
NS_CC_EXT_END
|
||||
|
||||
#endif // CC_USE_PHYSICS
|
||||
|
||||
#endif // __PHYSICSNODES_CCPHYSICSSPRITE_H__
|
||||
|
|
Loading…
Reference in New Issue