用途別リファレンス

文字を表示する

文字をテキストオブジェクトとして表示する

スコアを表示する

やり方1

Main
$score=0;
new Score;
while(true){
  if(getkey("z")==1) $score+=10;
  update();
}
Score
x=200;
y=200;
while(true) {
  text="Score:"+$score;
  update();
}

やり方2

Main
$score=0;
$scoreLabel=new Label{x:200,y:300};
while(true){
  if(getkey("z")==1) $score+=10;
  $scoreLabel.text="Score : "+$score;
  update();
}

Label
//何も書かない

zキーを押すとscoreが10増える。