Permalink
Browse files

issue #1562:update TileMapTest

  • Loading branch information...
1 parent baa0a45 commit 74e9b93753e16728e37354ac30275033afb0a360 @minggo committed Nov 19, 2012
@@ -354,7 +354,7 @@ TMXReadWriteTest::TMXReadWriteTest()
////----UXLOG("Tile GID at:(0,63) is: %d", m_gid);
schedule(schedule_selector(TMXReadWriteTest::updateCol), 2.0f);
- schedule(schedule_selector(TMXReadWriteTest::repaintWithGID), 2.0f);
+ schedule(schedule_selector(TMXReadWriteTest::repaintWithGID), 2.05f);
schedule(schedule_selector(TMXReadWriteTest::removeTiles), 1.0f);
////----UXLOG("++++atlas quantity: %d", layer->textureAtlas()->getTotalQuads());
@@ -1512,27 +1512,10 @@ void TileDemo::backCallback(CCObject* pSender)
s->release();
}
-void TileDemo::registerWithTouchDispatcher()
-{
- CCDirector* pDirector = CCDirector::sharedDirector();
- pDirector->getTouchDispatcher()->addTargetedDelegate(this, 0, true);
-}
-
-bool TileDemo::ccTouchBegan(CCTouch* touch, CCEvent* event)
-{
- return true;
-}
-
-void TileDemo::ccTouchEnded(CCTouch* touch, CCEvent* event)
-{
-}
-
-void TileDemo::ccTouchCancelled(CCTouch* touch, CCEvent* event)
-{
-}
-
-void TileDemo::ccTouchMoved(CCTouch* touch, CCEvent* event)
+void TileDemo::ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent)
{
+ CCTouch *touch = (CCTouch*)pTouches->anyObject();
+
CCPoint diff = touch->getDelta();
CCNode *node = getChildByTag(kTagTileMap);
CCPoint currentPos = node->getPosition();
@@ -21,11 +21,7 @@ class TileDemo : public CCLayer
void nextCallback(CCObject* pSender);
void backCallback(CCObject* pSender);
- void registerWithTouchDispatcher();
- bool ccTouchBegan(CCTouch* touch, CCEvent* event);
- void ccTouchEnded(CCTouch* touch, CCEvent* event);
- void ccTouchCancelled(CCTouch* touch, CCEvent* event);
- void ccTouchMoved(CCTouch* touch, CCEvent* event);
+ virtual void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent);
};
class TileMapTest : public TileDemo

0 comments on commit 74e9b93

Please sign in to comment.