Przeglądaj źródła

Fixed template project touch event handling.
Touch events were not being detected in the template project.

Darryl Gough 14 lat temu
rodzic
commit
eac1755cf1

+ 2 - 2
gameplay-template/src/TemplateGame.cpp

@@ -58,9 +58,9 @@ bool TemplateGame::drawScene(Node* node, void* cookie)
     return true;
 }
 
-void TemplateGame::touch(int x, int y, int touchEvent)
+void TemplateGame::touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex)
 {
-    switch (touchEvent)
+    switch (evt)
     {
     case Touch::TOUCH_PRESS:
         break;

+ 1 - 1
gameplay-template/src/TemplateGame.h

@@ -20,7 +20,7 @@ public:
     /**
      * Touch event handler.
      */
-    void touch(int x, int y, int touchEvent);
+    void touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex);
 
 protected: