Opposite || A Mobile Friendly Platformer


@Stage\n\nwhen flag clicked\nswitch backdrop to (背景1 v)\n\nwhen I receive [次！ v]\nnext backdrop\n\nwhen I receive [次！ v]\nif <(backdrop [name v]) = [朝]> then\n    set [状態 v] to [1]\n    wait (10) seconds\n    switch backdrop to (昼 v)\n    wait (10) seconds\n    switch backdrop to (夜 v)\n    set [状態 v] to [0]\nend\n\n@スプライト1\n\nwhen I receive [スタート v]\nset [制限 v] to [STOP]\nhide variable [x v]\nhide variable [y v]\nhide variable [制限 v]\npoint in direction (90)\ngo to x: (-170) y: (-41)\nset rotation style [left-right v]\nset size to (70) %\nshow\nset [x v] to [0]\nset [y v] to [0]\nwait until <<key (up arrow v) pressed?> or <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <mouse down?>>>>\nset [制限 v] to [OK]\nforever\n    if <(制限) = [OK]> then\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n            change [x v] by (1.5)\n            point in direction (90)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            change [x v] by (-1.5)\n            point in direction (-90)\n        end\n        set [x v] to ((x) * (0.8))\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 x by ((x) * (-1))\n                            change y by (-4)\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <[-50] < (mouse y)>>> then\n                                if <(x) > [0]> then\n                                    set [x v] to [-12]\n                                    start sound [Drum v]\n                                else\n                                    set [x v] to [12]\n                                    start sound [Drum v]\n                                end\n                                set [y v] to [10]\n                            else\n                                set [x v] to [0]\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 <<touching (地面 v)?> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <[-50] < (mouse y)>>>> then\n            change [y v] by (13)\n            start sound [Jump v]\n        end\n        change y by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <[240] < (x position)> then\n        broadcast (次！ v)\n    end\nend\n\nbroadcast (次！ v) and wait\n\nwhen I receive [次！ v]\ngo to x: (-170) y: (-41)\nset [制限 v] to [OK]\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <touching (障害物 v)?> then\n        switch costume to (ゾンビダメージ v)\n        start sound [やられた v]\n        set [制限 v] to [STOP]\n        go to x: (-170) y: (-41)\n        set [制限 v] to [OK]\n        wait (0.1) seconds\n        switch costume to (ゾンビ v)\n    end\nend\n\nwhen flag clicked\nset [状態 v] to [0]\nset volume to (100000) %\nforever\n    go to [front v] layer\n    play sound [音楽 v] until done\nend\n\nwhen flag clicked\nforever\n    if <<(状態) = [1]> and <[68] < (x position)>> then\n        switch costume to (ゾンビダメージ v)\n        start sound [やられた v]\n        go to [front v] layer\n        set [制限 v] to [STOP]\n        go to x: (-170) y: (-41)\n        set [制限 v] to [OK]\n        switch costume to (ゾンビ v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (障害物2 v)?> then\n        broadcast (ゴール v)\n        set [制限 v] to [STOP]\n    end\nend\n\nwhen I receive [ゴール v]\nset volume to (0) %\n\nwhen flag clicked\nswitch costume to (ゾンビ v)\n\n@地面\n\nwhen I receive [次！ v]\nnext costume\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (コスチューム1 v)\n\nbroadcast (次！ v)\n\nwhen flag clicked\nforever\n    go to x: (36) y: (29)\nend\n\n@スプライト3\n\n@スプライト4\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (コスチューム1 v)\nshow\nset [ghost v] effect to (0)\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    wait until <not <mouse down?>>\n    switch costume to (コスチューム2 v)\nend\n\nwhen this sprite clicked\nif <(costume [number v]) = [2]> then\n    broadcast (スタート v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [ghost v] effect to (100)\nend\n\n@コメント\n\nwhen I receive [スタート v]\ngo to [front v] layer\nshow\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\nhide\n\nwhen I receive [次！ v]\nshow\nnext costume\n\n@障害物\n\nwhen flag clicked\nswitch costume to (lava v)\n\nwhen I receive [次！ v]\ngo to [back v] layer\nnext costume\n\n@障害物2\n\nwhen flag clicked\nshow\nswitch costume to (lava v)\n\nwhen I receive [次！ v]\nnext costume\n\nbroadcast (次！ v)\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen I receive [ゴール v]\nhide\n\n@月\n\nwhen flag clicked\nswitch costume to (コスチューム2 v)\nshow\n\nwhen I receive [次！ v]\nnext costume\n\nwhen flag clicked\nhide variable [大きさ v]\nforever\n    change [大きさ v] by (1)\n    set size to ((([sin v] of ((大きさ) * (5)) ) * (10)) + (100)) %\nend\n\n@終わり\n\nwhen I receive [ゴール v]\nwait (0.1) seconds\nforever\n    go to [front v] layer\n    set size to (100) %\n    show\n    if <<(costume [number v]) = [1]> or <(costume [number v]) = [2]>> then\n        go to x: (-40) y: (0)\n        set [brightness v] effect to (100)\n        set [縦 v] to [35]\n        set [横 v] to [20]\n        repeat (10)\n            change [brightness v] effect by (-10)\n            change size by (((130) - (size)) / (5))\n            set [縦 v] to (((縦) * (0.75)) + (((0) - (x position)) / (8.5)))\n            set [横 v] to (((横) * (0.75)) + (((0) - (y position)) / (7)))\n            change x by (縦)\n            change y by (横)\n        end\n        repeat (20)\n            change size by (((100) - (size)) / (5))\n            set [縦 v] to (((縦) * (0.75)) + (((0) - (x position)) / (8.5)))\n            set [横 v] to (((横) * (0.75)) + (((0) - (y position)) / (5)))\n            change x by (縦)\n            change y by (横)\n        end\n    end\n    wait (2) seconds\nend\n\nwhen flag clicked\nhide\nswitch costume to (pick random (1) to (2))\n\n@サムネ\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    show\n    go to x: (0) y: (0)\n    switch costume to (コスチューム2 v)\nend\n\nwhen I receive [ゴール v]\nforever\n    play sound [TheFatRat - Unity v] until done\nend\n\n@タボフィー\n\nwhen flag clicked\nforever\n    set [turbo v] to [0]\n    wait (0.001) seconds\n    if <[3] < (Turbo)> then\n        show\n        stop [all v]\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\nforever\n    change [turbo v] by (1)\nend\n\n