mirror of https://github.com/axmolengine/axmol.git
issue #171, implement CGRectIntersectsRect
This commit is contained in:
parent
b8f59f623d
commit
f1c48be489
|
@ -134,10 +134,10 @@ bool CGRect::CGRectContainsPoint(const CGRect& rect, const CGPoint& point)
|
|||
|
||||
bool CGRect::CGRectIntersectsRect(const CGRect& rectA, const CGRect& rectB)
|
||||
{
|
||||
return !(rectA.CGRectGetMaxX() < rectB.CGRectGetMinX()||
|
||||
rectB.CGRectGetMaxX() < rectA.CGRectGetMinX()||
|
||||
rectA.CGRectGetMaxY() < rectB.CGRectGetMinY()||
|
||||
rectB.CGRectGetMaxY() < rectA.CGRectGetMinY());
|
||||
return !(CGRectGetMaxX(rectA) < CGRectGetMinX(rectB)||
|
||||
CGRectGetMaxX(rectB) < CGRectGetMinX(rectA)||
|
||||
CGRectGetMaxY(rectA) < CGRectGetMinY(rectB)||
|
||||
CGRectGetMaxY(rectB) < CGRectGetMinY(rectB));
|
||||
}
|
||||
|
||||
}//namespace cocos2d {
|
||||
|
|
|
@ -30,6 +30,7 @@ THE SOFTWARE.
|
|||
#include "CCProtocols.h"
|
||||
#include "CCSpriteFrame.h"
|
||||
|
||||
namespace cocos2d {
|
||||
/**
|
||||
@brief An interval action is an action that takes place within a certain period of time.
|
||||
It has an start time, and a finish time. The finish time is the parameter
|
||||
|
@ -47,9 +48,6 @@ Example:
|
|||
|
||||
CCAction *pingPongAction = CCSequence::actions(action, action->reverse(), NULL);
|
||||
*/
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
class CCX_DLL CCIntervalAction : public CCFiniteTimeAction
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue