Guys i need a suggestion on how will i make this shooting feature in my game?
On the picture below you will see the tap location. if the user tap that location
a missile will fire towards it “straight” the missile will just appear below
Guys i need a suggestion on how will i make this shooting feature in my game?
On the picture below you will see the tap location. if the user tap that location
a missile will fire towards it “straight” the missile will just appear below
Yes ,If you tap/touch a certain x and y coordinates that will fire directly straight upward to the screen tap or touch…
OK, easy then. In your tap/touch event handler function, just access event.x… that is the x location on the screen where the tap occurred. Use it to set the x position of your missile (with y position near the bottom of the screen?) and then move the missile directly upward by transition, physics, or whatever method you decide on.
Brent
Yes ,If you tap/touch a certain x and y coordinates that will fire directly straight upward to the screen tap or touch…
OK, easy then. In your tap/touch event handler function, just access event.x… that is the x location on the screen where the tap occurred. Use it to set the x position of your missile (with y position near the bottom of the screen?) and then move the missile directly upward by transition, physics, or whatever method you decide on.
Brent