I’m developing a game for iPhone using COCOS2D.
In that, I need to draw a line when user drag his finger from a point to another. As far as my knowledge is concern I need to do this in Touches Moved method from where I can get the points.
But I don’t know how to do this. Can anybody help me on this?
Kia ora. Boredom compels me to provide an answer on this topic.
Layer part (i.e. @interface GetMyTouches : CCLayer):
Node part (i.e. @interface DrawMyTouch: CCNode) :
Layer part II (i.e. @interface GetMyTouches : CCLayer):
Remember touching is easy. Knowing what you’re doing while touching isn’t rocket science.
Finally, if you don’t understand anything i’ve posted … take up baking. The world needs more chocolate cake producers.
Clarification:
Of note, I love a good chocolate cake. The world really does need more fantastic bakers. That’s not an insult, that’s encouragement.
“Look outside the square, to find the circle filled with the knowledge that makes life worth living” ~ Aenesidemus.