用途別リファレンス

特定のオブジェクトだけスクロールの影響を受けないようにする

Main
//このキャラクタ単独ではスクロールしていることがわかりにくいので、動かないオブジェクトをいくつか置いておく
for (i=0;i<10;i++) {
    new Actor{x:rnd(400),y:rnd(400)};
}
//-----
$score=0;
new Score{x:200, y:200, text:$score, layer:$frontLayer};//★
i=0;
while(true){
    if(getkey("z")==1) $score+=10;
    $Screen.scrollTo(i,0);
    i++;
    update();
}

Score
while(true) {
    text="Score:"+$score;
    update();
}

参考: