Question by
abeLincoln41 · Jan 10, 2017 at 09:39 PM ·
jumpingscoremobile devicesscore system
Score tracker adding too many points per jump
In my game a player receives points every time they make a jump and there should only be one point added per jump. I have the jump() method in the Update() method and this is what the jump method calls.
public void jump()
{
if (checkCanJump())
{
myBody.velocity = new Vector2(myBody.velocity.x, jumpSpeed);
scoreTracker.scoreCount++;
}
}
checkCanJump() simply ensures that the player is touching the ground and checks to see if the player is touching the screen. When I run the game on the computer the scoring works fine but when I use my iPhone every time I jump receive 2-3 points. Why is this? Thanks!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612104547im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Anyway To Set A Specific Part Of Code To A Scene? 2 Answers
Scoring Points with UI Problem! 0 Answers
reload game 1 Answer
UI printing in multiple sections.(not supposed to) c#(Solved) 1 Answer
Spawn Object on Set Score 0 Answers