What shall I use to pause my game?
Hi friend I have builded a game that makes my charcater jump with every touch using
if (Input.touchCount > 0){ (if Input.GetTouch(0).phase == TouchPhase.Began){ }}
But now when I need my pauseButtom for my game he jumps when I press the buttom. So I was thinking how I fix this in the best way. I was thinking on a eventrigger that know if any touch is over the buttom and I can say
(if Input.GetTouch(0).phase == TouchPhase.Began && mouseIsOver){}
But im not quite sure. Please help me think.
Answer by mikaelquick · Dec 20, 2016 at 10:56 PM
Hi again friends. After some food I realised the answer. I just used a 2 eventriggers on my buttom.
For checking onEnter making jumpAble = false
For checking onExit making jumpAble = true
Peace out friends
Your answer
Follow this Question
Related Questions
Pausing Play on Android 0 Answers
How to program a pause/unpause button in C#. 2 Answers
How to pause an animation 1 Answer
How to create an exception in Time.TimeScale 1 Answer
How to detect a touch inside a GUI 0 Answers