What is being passed to onTouchesEnded:function (touches)?

I am trying to make my function dynamic so I can use the same exact one for mouse and touch. Currently I have:

onTouchesEnded:function (touches) {

                    movePlayer(this, touches[0], player);

                },

onMouseUp: function (event) {

                    movePlayer(this, event, player);               


                }

Where I have to pass “touches” to my function for touch and “event” for mouse. What is touches and is there a getter for it?

Still haven’t figure it out if anyone has some insight.

You don’t need to create a custom class to handle touches and clicks. EventListenerTouchOneByOne (and EventListenerTouchAllAtOnce I think) already detect them both.

Ok I will experiment with that, thanks.