秋のプラットフォーマー/fall Platformer
@Stage\n\n@プレイヤー\n\ndefine スタートプログラム\nshow\nset [x v] to [0]\nset [y v] to [0]\nset rotation style [left-right v]\ngo to x: (-210) y: (-30)\nset size to (90) %\nswitch costume to (➡ v)\n\nwhen I receive [スタート v]\nshow\nスタートプログラム\nforever\n    if <<key (right arrow v) pressed?> or <<<mouse down?> and <(x position) < (mouse x)>> or <key (d v) pressed?>>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <<<mouse down?> and <(mouse x) < (x position)>> or <key (a v) pressed?>>> then\n        point in direction (-90)\n        change [x v] by (-1)\n    end\n    set [x v] to ((x) * (0.89))\n    change x by (x)\n    if <touching (ステージ v)?> then\n        change y by (1)\n        if <touching (ステージ v)?> then\n            change y by (1)\n            if <touching (ステージ v)?> then\n                change y by (1)\n                if <touching (ステージ v)?> then\n                    change y by (1)\n                    if <touching (ステージ v)?> then\n                        change y by (1)\n                        if <touching (ステージ v)?> then\n                            change y by (-5)\n                            change x by ((x) * (-1))\n                            if <<key (up arrow v) pressed?> or <<<mouse down?> and <(y position) < (mouse y)>> or <key (w v) pressed?>>> then\n                                if <(x) < [0]> then\n                                    start sound [壁キック v]\n                                    set [x v] to [10]\n                                else\n                                    start sound [壁キック v]\n                                    set [x v] to [-10]\n                                end\n                                set [y v] to [15]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-0.9)\n    change y by (y)\n    if <touching (ステージ v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> or <<<mouse down?> and <(y position) < (mouse y)>> or <key (w v) pressed?>>> then\n        if <touching (ステージ v)?> then\n            start sound [ジャンプ v]\n            set [y v] to [15]\n        end\n    end\n    change y by (1)\n    if <<touching (トゲ v)?> or <(y position) < [-180]>> then\n        スタートプログラム\n    end\n    if <[242] < (x position)> then\n        broadcast (次 v)\n        スタートプログラム\n    end\nend\n\nwhen flag clicked\nbroadcast (スタート v)\n\n@ステージ\n\nwhen I receive [次 v]\nchange [ステージ v] by (1)\nswitch costume to (ステージ)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ステージ v] to [1]\nswitch costume to (1 v)\n\nwhen flag clicked\nforever\n    if <(ステージ) = [12]> then\n        broadcast (表示 v)\n        wait until <not <(ステージ) = [12]>>\n        broadcast (2 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [17]> then\n        broadcast (akk v)\n        wait until <not <(ステージ) = [17]>>\n        broadcast (Bye v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ステージ) = [20]> then\n        broadcast (ゴル v)\n        stop [this script v]\n    end\nend\n\n@ステージ2\n\nwhen I receive [次 v]\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(ステージ) = [7]> then\n        show\n        if <touching (プレイヤー v)?> then\n            set [ghost v] effect to (50)\n        else\n            set [ghost v] effect to (0)\n        end\n    else\n        hide\n    end\nend\n\n@SAN\n\nwhen flag clicked\nset [揺れる v] to [0]\nset size to (80) %\nforever\n    go to [back v] layer\n    change [揺れる v] by (7)\n    change size by ([sin v] of (揺れる) )\nend\n\n@ターボモード検知\n\nwhen I receive [メッセージ1 v]\nset [ターボモード検知 v] to [0]\nforever\n    if <(ターボモード検知) = [完了]> then\n        set [ターボモード検知 v] to [OK]\n        stop [this script v]\n    else\n        change [ターボモード検知 v] by (1)\n    end\n    wait (0) seconds\nend\n\nwhen flag clicked\nhide\nforever\n    broadcast (メッセージ1 v)\n    wait (0.001) seconds\n    if <(ターボモード検知) > [10]> then\n        show\n        stop [all v]\n    end\n    set [ターボモード検知 v] to [完了]\n    wait until <(ターボモード検知) = [OK]>\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@BGM\n\nwhen flag clicked\nforever\n    play sound [BGM v] until done\nend\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (1 v)\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        next costume\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\n    if <(costume [number v]) = [1]> then\n        set volume to (100) %\n    else\n        set volume to (0) %\n    end\nend\n\n@かざり\n\nwhen flag clicked\nforever\n    turn right (3) degrees\n    go to (プレイヤー v)\n    go to [back v] layer\nend\n\n@落ち葉\n\nwhen flag clicked\nhide\nforever\n    switch costume to (pick random (1) to (4))\n    create clone of (_myself_ v)\n    wait (pick random (0.01) to (0.2)) seconds\nend\n\nwhen I start as a clone\ngo to [back v] layer\nshow\ngo to x: (300) y: (pick random (110) to (-110))\nrepeat until <(x position) < [-300]>\n    change x by (join [-] (pick random (10) to (30)))\n    turn right (15) degrees\nend\ndelete this clone\n\n@雲\n\nwhen flag clicked\nhide\nforever\n    switch costume to (pick random (1) to (3))\n    create clone of (_myself_ v)\n    wait (pick random (0.5) to (3)) seconds\nend\n\nwhen I start as a clone\ngo to x: (300) y: (pick random (180) to (100))\nshow\ngo to [back v] layer\nrepeat until <(x position) < [-240]>\n    change x by (join [-] (pick random (2) to (6)))\nend\ndelete this clone\n\n@サムネ\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    set [ghost v] effect to (100)\n    show\n    go to [front v] layer\nend\n\n@トゲ\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    switch costume to (ステージ)\n    show\n    if <(costume [number v]) = [5]> then\n        turn right (-3) degrees\n    else\n        if <(costume [number v]) = [10]> then\n            go to x: (0) y: (-40)\n            turn right (4) degrees\n        else\n            if <(costume [number v]) = [11]> then\n                turn right (10) degrees\n                go to x: (170) y: (-65)\n            else\n                point in direction (90)\n                go to x: (0) y: (0)\n            end\n        end\n    end\nend\n\ngo to [back v] layer\n\n@タイム\n\nwhen flag clicked\nset [time v] to [0]\nforever\n    wait (1) seconds\n    change [time v] by (1)\nend\n\nwhen I receive [ゴル v]\nstop [other scripts in sprite v]\n\n@うしろ\n\nwhen flag clicked\nhide\nrepeat (10)\n    go to [back v] layer\nend\n\nwhen I receive [表示 v]\nswitch costume to (コスチューム1 v)\nshow\n\nwhen I receive [2 v]\nswitch costume to (コスチューム2 v)\n\nwhen I receive [akk v]\nswitch costume to (コスチューム3 v)\n\nwhen I receive [bye v]\nhide\n\n@スプライト1\n\nwhen I receive [akk v]\nshow\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nhide\n\n