This project is read-only.

TouchMoved and TouchedMoved

Topics: iOS, Sample Code and Demos
May 20, 2014 at 4: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

May 20, 2014 at 4:49 PM
Edited May 20, 2014 at 4: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 5:00 PM

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

Thanks a lot !!!