- Home /
Holding button and adding score per sec
Hi and Merry Christmas. Im making a mobile game im totally beginner and i need help. How write a script. When button(not on keyboard) is hold that increase a score(+0,5 per frame), next that score change for money
Comment
Best Answer
Answer by PersianKiller · Dec 24, 2017 at 05:13 PM
hey , watch this ,it's not very nice,but it could help :).
also you can change it to this ,so when you're not pushing the button,the script will be disabled .
public void addingScore(){
enabled = true;
addScorrreee=true;
}
public void dontAddScore(){
addScorrreee = false;
enabled = false;
}