It is a sample that scrolls with only one sprite. Calculate the costume and display position of two cloned sprites from the value of "g_verticalPosition" of the global variable. Move character with the cursor key up, down, left and right. ひとつのスプライトだけでスクロールをさせるサンプルです。 グローバル変数の「g_verticalPosition」の値から、クローンされた2つのスプライトのコスチュームと表示位置を算出します。 カーソルキーの上下左右で自機が移動します。
As an easy way to scroll, there are some alternate movements while switching costumes with two sprites, but this is an experiment to try this with a single sprite. For the time being, as a sample, I made a scroll of the feeling of shooting game. スクロールの簡単な方法としては、2つのスプライトでコスチュームを切り替えながら交互に移動させるというものがありますが、これをひとつのスプライトでやってみようという実験です。 とりあえずはサンプルとして、シューティングゲームっぽく作ってみました。