[#26]Nyan2022 Platformer! ฅ(^･ω･^)

Instructions: ⚠︎注意⚠︎ 謎に長い前置きがありますがご容赦ください。\n【操作方法/Operation Method】\n・右移動/Right move：右矢印キー/Right arrow key\n・左移動/Left move   ：左矢印キー/Left arrow key\n・ジャンプ/Jump      ：上矢印キー/Up arrow key\nฅ(^･ω･^)ﾆｬ?ﾜﾝ!　Meow? Woof!!\n@kojinaetan様 @d51gogo様 @TOUFU210様

@Stage\n\nwhen flag clicked\nbroadcast (INTRO v)\n\nwhen I receive [スタート v]\nchange [pitch v] effect by (20)\nforever\n    play sound [Nyan Cat v] until done\nend\n\n@ネクスト\n\nwhen flag clicked\nhide\n\nwhen I receive [next v]\nset [操作判定 v] to [1]\ngo to [front v] layer\ngo to x: (-400) y: (0)\nshow\nglide (0.5) secs to x: (0) y: (0)\nbroadcast (NEXTステージ v)\nwait (0.5) seconds\nglide (0.5) secs to x: (400) y: (0)\nset [操作判定 v] to [0]\nhide\n\n@player\n\nwhen I receive [nextステージ v]\nswitch costume to (1 v)\ngo to x: (-180) y: (30)\nset [x v] to [0]\nset [y v] to [0]\n\nwhen I receive [スタート v]\nwait (0.02) seconds\nswitch costume to (1 v)\nshow\ngo to [front v] layer\ngo to x: (-180) y: (0)\npoint in direction (90)\nset rotation style [left-right v]\nset [x v] to [0]\nset [y v] to [0]\nforever\n    動作\nend\n\nwhen flag clicked\nhide\n\ndefine 動作\nif <(操作判定) = [0]> then\n    go to [front v] layer\n    set [マグマ v] to [0]\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        switch costume to (2 v)\n        change [x v] by (1)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n            switch costume to (3 v)\n            change [x v] by (-1)\n        else\n            switch costume to (1 v)\n        end\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    if <touching color (#3500ff)?> then\n        set [y v] to [20]\n    end\n    if <<touching color (#808080)?> or <touching color (#404040)?>> then\n        set [マグマ v] to [1]\n    end\n    if <<touching color (#00ff1e)?> or <<touching color (#00b315)?> or <<touching color (#ff9d00)?> or <touching color (#ffffff)?>>>> then\n        change x by ((X) * (-1))\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            start sound [High Whoosh v]\n            if <(X) < [0]> then\n                set [x v] to [10]\n            else\n                set [x v] to [-10]\n            end\n            set [y v] to [13]\n        else\n            set [x v] to [0]\n        end\n    end\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching color (#3500ff)?> then\n        set [y v] to [20]\n    end\n    if <<touching color (#808080)?> or <touching color (#404040)?>> then\n        set [マグマ v] to [1]\n    end\n    if <<touching color (#00ff1e)?> or <<<touching color (#ff9d00)?> or <touching color (#00b315)?>> or <touching color (#ffffff)?>>> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<<touching color (#00ff1e)?> or <<touching color (#ffffff)?> or <touching color (#ff9d00)?>>> and <key (up arrow v) pressed?>> or <<<<touching color (#00ff1e)?> or <<touching color (#ffffff)?> or <touching color (#ff9d00)?>>> and <key (w v) pressed?>> or <<<touching color (#00ff1e)?> or <<touching color (#ffffff)?> or <touching color (#ff9d00)?>>> and <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        start sound [High Whoosh v]\n        set [y v] to [13]\n    end\n    change y by (1)\n    if <<(マグマ) = [1]> or <(y position) < [-160]>> then\n        再挑戦\n    end\n    if <(x position) > [230]> then\n        broadcast (NEXT v)\n        start sound [Magic Spell v]\n    end\nend\n\ndefine 再挑戦\nswitch costume to (1 v)\nstart sound [Oops v]\ngo to x: (-180) y: (30)\nset [x v] to [0]\nset [y v] to [0]\n\n@地面\n\nwhen flag clicked\nhide\n\nwhen I receive [スタート v]\nwait (0.02) seconds\nswitch costume to (コスチューム1 v)\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\n\nwhen I receive [nextステージ v]\nnext costume\n\n@サムネ2\n\nwhen flag clicked\nhide\n\nwhen I receive [タイトル v]\nswitch costume to (コスチューム2 v)\nshow\nwait until <<mouse down?> and <touching (mouse-pointer v)?>>\nhide\nbroadcast (スタート v)\n\n@HOKKAIDO_MENMA intro\n\nwhen I start as a clone\nif <(変数) = [1]> then\n    set [ghost v] effect to (100)\n    show\n    wait until <(timer) > [2]>\n    go to [back v] layer\n    repeat (25)\n        change [ghost v] effect by (-4)\n    end\n    wait until <(timer) > [10.5]>\n    delete this clone\nelse\n    if <(変数) = [2]> then\n        go to x: (0) y: (-70)\n        wait until <(timer) > [3.3]>\n        go to [front v] layer\n        show\n        point in direction (90)\n        set [m v] to [0]\n        set size to (0) %\n        repeat (46)\n            set [m v] to (((m) * (0.75)) + (((130) - (size)) * (0.3)))\n            change size by (m)\n        end\n        repeat (145)\n            set x to ((([sin v] of (((timer) - (1)) * (100)) ) * (6)) + (0))\n            point in direction ((([sin v] of (((timer) - (1)) * (1000)) ) * (4)) + (90))\n        end\n        point in direction (90)\n        wait until <(timer) > [10.5]>\n        delete this clone\n    else\n        if <(変数) = [3]> then\n            go to x: (0) y: (60)\n            wait until <(timer) > [3.3]>\n            go to [front v] layer\n            show\n            point in direction (90)\n            set [m v] to [0]\n            set size to (0) %\n            repeat (46)\n                set [m v] to (((m) * (0.75)) + (((130) - (size)) * (0.3)))\n                change size by (m)\n            end\n            repeat (3)\n                set [m v] to [0]\n                set size to (130) %\n                point in direction (-90)\n                repeat (46)\n                    set [m v] to (((m) * (0.75)) + (((90) - (direction)) * (0.3)))\n                    turn right (m) degrees\n                end\n            end\n            wait until <(timer) > [10.5]>\n            delete this clone\n        else\n            if <(変数) = [4]> then\n                go to x: (0) y: (0)\n                set [ghost v] effect to (10)\n                wait until <(timer) > [3.3]>\n                show\n                repeat until <(timer) > [10.5]>\n                    set x to ((([sin v] of (((timer) - (1)) * (100)) ) * (6)) + (0))\n                    point in direction ((([sin v] of (((timer) - (1)) * (1000)) ) * (4)) + (90))\n                end\n                delete this clone\n            else\n                if <(変数) = [5]> then\n                    go to x: (0) y: (-300)\n                    wait until <(timer) > [10]>\n                    go to [front v] layer\n                    show\n                    glide (0.4) secs to x: (0) y: (0)\n                    wait (0.1) seconds\n                    glide (0.4) secs to x: (0) y: (-300)\n                    delete this clone\n                else\n                    if <(変数) = [6]> then\n                        go to x: (0) y: (300)\n                        wait until <(timer) > [10]>\n                        go to [front v] layer\n                        show\n                        glide (0.4) secs to x: (0) y: (0)\n                        wait (0.1) seconds\n                        broadcast (タイトル v)\n                        glide (0.4) secs to x: (0) y: (-300)\n                        delete this clone\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [スタンバイok v]\nplay sound [TheFatRat - Monody v] until done\n\nwhen I receive [スタンバイok v]\nclear graphic effects\nhide\nswitch costume to (背景 v)\nset [変数 v] to [0]\nreset timer\nrepeat (6)\n    change [変数 v] by (1)\n    create clone of (_myself_ v)\n    next costume\nend\n\n@スプライト1\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\ngo to x: (0) y: (0)\nstart sound [StartUpSound v]\nrepeat (2)\n    switch costume to (コスチューム4 v)\n    wait (1) seconds\n    switch costume to (コスチューム1 v)\n    wait (1) seconds\n    switch costume to (コスチューム2 v)\n    wait (1) seconds\n    switch costume to (コスチューム3 v)\n    wait (1) seconds\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nbroadcast (daxa v)\n\n@スプライト2\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\n\nwhen I receive [daxa v]\nrest for (1.25) beats\nset instrument to (4 v)\nplay note (83) for (0.25) beats\nplay note (79) for (0.25) beats\n\nwhen I receive [daxa v]\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (5) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nhide\nwait (1) seconds\nbroadcast (スタンバイok v)\n\n@Sun\n\nwhen flag clicked\nhide\n\nwhen I receive [スタート v]\nhide\ngo to [back v] layer\nshow\ngo to x: (217) y: (160)\nset size to (100) %\nreset timer\ngo to [back v] layer\nforever\n    repeat (50)\n        change size by (((140) - (size)) / (18))\n    end\n    repeat (50)\n        change size by (((size) - (100)) / (-18))\n    end\nend\n\nbroadcast (タイトルが〜めん v)\n\n