$score=0; new Score; while(true){ if(getkey("z")==1) $score+=10; update(); }
x=200; y=200; while(true) { text="Score:"+$score; update(); }やり方2
$score=0; $scoreLabel=new Label{x:200,y:300}; while(true){ if(getkey("z")==1) $score+=10; $scoreLabel.text="Score : "+$score; update(); }
//何も書かないzキーを押すとscoreが10増える。