![赤丸先生](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/赤丸先生.png)
赤丸先生
青丸くん。今日は、迷路ゲームを作っていくよ!
えー難しそう
![青丸くん](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/青丸くん.png)
青丸くん
![赤丸先生](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/赤丸先生.png)
赤丸先生
今日は、定義ブロックというのを追加するよ。
でも、定義ブロックってなに?
![青丸くん](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/青丸くん.png)
青丸くん
![赤丸先生](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/赤丸先生.png)
赤丸先生
それは後で解説するよ。
![赤丸先生](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/赤丸先生.png)
赤丸先生
まずは、ネコを動かせるようにするよ。
ネコのプログラムを、下のようにしてね。
![ScratchのRPGみたいに動かそうとしたら動かなかったプログラム](https://amuos1210.yurushoku.com/wp-content/uploads/2020/07/image-14.png)
あれ?実行しても動かないよ。
![青丸くん](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/青丸くん.png)
青丸くん
![赤丸先生](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/赤丸先生.png)
赤丸先生
まだ動きのプログラムを追加していないからね。
確かに。
![青丸くん](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/青丸くん.png)
青丸くん
![赤丸先生](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/赤丸先生.png)
赤丸先生
ここで定義ブロックを使うよ。
下の動画を見てね。
こうやって作るのか。
![青丸くん](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/青丸くん.png)
青丸くん
![赤丸先生](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/赤丸先生.png)
赤丸先生
そしたら、下のようにプログラムしてね。
![Scratchのブロック
定義 動くxは(x)yは(y)
x座標をxずつ変える
y座用をyずつ変える](https://amuos1210.yurushoku.com/wp-content/uploads/2020/07/image-16.png)
![赤丸先生](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/赤丸先生.png)
赤丸先生
そしたら、さっきの上下左右キーのプログラムを変えるよ。
![](https://amuos1210.yurushoku.com/wp-content/uploads/2020/07/image-17.png)
![赤丸先生](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/赤丸先生.png)
赤丸先生
これでネコが動いたかな。
動いた!!!
![青丸くん](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/青丸くん.png)
青丸くん
![赤丸先生](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/赤丸先生.png)
赤丸先生
次回は、迷路を追加していくよ。
楽しみだな~
![青丸くん](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/青丸くん.png)
青丸くん
![赤丸先生](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/赤丸先生.png)
赤丸先生
じゃあ、、
![2人](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/2人.png)
2人
ばいばーい
![AMUOS1210](https://amuos1210.yurushoku.com/wp-content/uploads/2020/06/ロゴ.png)
AMUOS1210
ばいばーい