SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var count = 0;
  2. onEvent("upButton", "click", function() {
  3.   count = count + 1;
  4.   setText("countDisplayLabel", count);
  5.   if (count == 20) {
  6.     setScreen("gameOverScreen");
  7.     setText("finalScoreLabel", count);
  8.   }
  9. });
  10. onEvent("downButton", "click", function() {
  11.   count = count - 1;
  12.   setText("countDisplayLabel", count);
  13.   if (count == -5) {
  14.     setScreen("gameOverScreen");
  15.     setText("finalScoreLabel", count);
  16.   }
  17. });
  18. onEvent("startOverButton", "click", function() {
  19.   count = 0;
  20.   setText("countDisplayLabel", 0);
  21.   setScreen("gamePlayScreen");
  22. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top