Game Development Reference
In-Depth Information
screen, and the event sets the value of phase to began . It also sets the target to the object that has been
touched and the x and y to the coordinates of point where the user placed the finger on the screen.
The touch “began” event and its members
phase is set to move . The target , x , and y still contain the values of the object
8-10 , a series of touch events are triggered, with phase set to move , and the x and y
Figure 8-10. The touch “move” event and its members
When the user lifts the finger off the screen, a touch event is triggered with phase set to ended , as
shown in Figure 8-11 . The other three attributes reflect the target and the x and y position where the
touch ended.
Figure 8-11. The touch “ended” event and its members
Search WWH ::




Custom Search