fixed #926: retain/release in Paddle

This commit is contained in:
minggo 2011-12-28 15:13:02 +08:00
parent fcb2294e20
commit 08e0be754b
2 changed files with 14 additions and 1 deletions

View File

@ -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();
}

View File

@ -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);
};