TouchMoved and TouchedMoved

Topics: iOS, Sample Code and Demos
May 20, 2014 at 3:17 PM
Hi !

I can't figure how to fire event TouchMoved and TouchedMoved, I override like this :
        public override void TouchMoved (CCTouch touch) {
        CCLog.Log ("touch move");
            base.TouchMoved (touch);
        }

        public override void TouchesMoved (List<CCTouch> touches) {
            CCLog.Log ("touches move");
            base.TouchesMoved (touches);
        }
Someone can help me ?

Thanks a lot

Simon
Coordinator
May 20, 2014 at 3:49 PM
Edited May 20, 2014 at 3:49 PM
It starts with enabling touches:

CCNode myNode;
myNode.TouchEnabled = true;

Next you determine how you want to handle touches:

myNode.TouchMode = CCTouchMode.OneByOne ; // This is the void TouchMoved(CCTouch t) event
myNode.TouchMode = CCTouchMode.AllAtOnce; // This is the void TouchesMoved(List<CCTouch) l) event
May 20, 2014 at 4:00 PM
Thanks!

I found the mistake, I simply set TouchEnable to the background sprite :(

Thanks a lot !!!

Simon