Hey peeps,
I have a 2d top down game where I want the user to be able to press anywhere on the screen to fire projectiles from the player. So I don’t really need any co-ordinates for the click. I just don’t know how to achieve this. My biggest problem is I also have a game object with a pause button sprite attached to it. If the user clicks that I dont want the player to fire but rather run the pause game method.
How would I go about setting this up?
- Im not sure how to do a generic screen click for the iPhone using unity.
- Is it simply attaching OnMouseDown code to a game object to detect if it was pressed with the iphone?
- I’m not sure how I would override the screen click when I hit the pause button game object or any other game object I may attach click code to.
I thought it would be easy to find these answers somewhere but I did a little searching and cant find much. All the stuff I managed to find is OnGUI stuff and I’m trying to avoid using GUI.
Any thoughts?