I have an app that has a ball you have to tilt through gaps in rectangles to gain points. The rectangles approach from the right side of the screen (moving left). The ball is very sensitive and if the player has the phone held anything otherwise than very flat when the game is started then the player will instantly die (deaths occur when a player hits the screen sides [with the ball] or if they hit a rectangle) before the ball is even first drawn on the screen leaving a user questioning how they died when in reality the reason is they did not hold the screen flat and no ball was drawn yet. That is why I want to add a tap to play animation that prompts the user to hold the screen flat while still showing the game screen behind the notice (sort of like the FlappyBird tap to play feature) and gets the user to tap the screen to start the game. How would I add this feature to my app without it being another activity and easily implement it code wise?
Asked
Active
Viewed 45 times
0
-
Why not add OnCliclListenr to the root view, start the Animation in the onClick, and disable the ClickListener after animation finishe? Your question is little vague.. – yshahak Mar 01 '15 at 08:28
-
@yshahak To be more clear I want the game screen to come up and over it have text that tells the user to hold the device flat and to tap to play the game. Once tapped the game will begin, the accelerometer will start and rectangles will begin to come twards the ball from the right. Should I just enclose the code that starts the accelerometer and the code that moves the rectangles with the onclicklisrener you suggested? – Benyam Ephrem Mar 01 '15 at 15:04
-
It is one wat to achive it. You can move the trigger of the game to the OnClickListener. – yshahak Mar 01 '15 at 18:38