mirror of https://github.com/axmolengine/axmol.git
fixed #926: retain/release in Paddle
This commit is contained in:
parent
fcb2294e20
commit
08e0be754b
|
@ -81,4 +81,14 @@ void Paddle::ccTouchEnded(CCTouch* touch, CCEvent* event)
|
|||
CCAssert(m_state == kPaddleStateGrabbed, L"Paddle - Unexpected state!");
|
||||
|
||||
m_state = kPaddleStateUngrabbed;
|
||||
}
|
||||
}
|
||||
|
||||
void Paddle::touchDelegateRetain()
|
||||
{
|
||||
this->retain();
|
||||
}
|
||||
|
||||
void Paddle::touchDelegateRelease()
|
||||
{
|
||||
this->release();
|
||||
}
|
|
@ -27,6 +27,9 @@ public:
|
|||
virtual bool ccTouchBegan(CCTouch* touch, CCEvent* event);
|
||||
virtual void ccTouchMoved(CCTouch* touch, CCEvent* event);
|
||||
virtual void ccTouchEnded(CCTouch* touch, CCEvent* event);
|
||||
|
||||
virtual void touchDelegateRetain();
|
||||
virtual void touchDelegateRelease();
|
||||
|
||||
static Paddle* paddleWithTexture(CCTexture2D* aTexture);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue