Sea  - A platformer game -（スマホ対応）
@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (Level)\nend\n\nwhen flag clicked\nforever\n    play sound [kuuhaku to seizyaku v] until done\nend\n\n@Sea\n\nwhen flag clicked\nset size to (100) %\ngo to [front v] layer\nset [ghost v] effect to (50)\ngo to x: (0) y: (0)\npoint in direction (90)\ncreate clone of (_myself_ v)\nset [i v] to [90]\nforever\n    change [i v] by (5)\n    change y by (([sin v] of (i) ) / (2))\nend\n\nwhen I start as a clone\nset [ghost v] effect to (70)\ngo to [back v] layer\nwait (0.5) seconds\nset [i v] to [0]\nforever\n    change [i v] by (6)\n    change y by (([sin v] of (i) ) / (2))\nend\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen I start as a clone\nforever\n    switch costume to (Level)\nend\n\n@ステージ\n\nwhen flag clicked\nshow\nforever\n    switch costume to (Level)\nend\n\n@Player\n\nwhen flag clicked\nset rotation style [left-right v]\nset size to (200) %\npoint in direction (90)\nswitch costume to (a v)\nset [xの力 v] to [0]\nset [yの力 v] to [0]\ngo to x: (-200) y: (200)\n動作\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (b v)\nclear graphic effects\nset [ghost v] effect to (60)\nshow\nrepeat (5)\n    change [ghost v] effect by (8)\nend\ndelete this clone\n\nwhen flag clicked\nswitch backdrop to (背景1 v)\nset [level v] to [1]\nforever\n    if <<[239] < (x position)> and <not <(Level) = [10]>>> then\n        Next >>\n    end\n    if <(restart) = [1]> then\n        go to x: (-200) y: ((<(Level) = [9]> * (-320)) + (200))\n        point in direction (90)\n        set [xの力 v] to [0]\n        set [yの力 v] to [0]\n        set [restart v] to [0]\n    end\nend\n\ndefine Next >>\nchange [level v] by (1)\nset [xの力 v] to [0]\nset [yの力 v] to [0]\ngo to x: (-200) y: ((<(Level) = [9]> * (-320)) + (200))\npoint in direction (90)\n\ndefine 動作\nforever\n    change [yの力 v] by (-1)\n    if <touching (sea v)?> then\n        set [yの力 v] to ((yの力) * (0.7))\n    end\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<<<(mouse x) > (x position)> and <not <[-200] > (mouse x)>>> or <(mouse x) > [200]>> and <mouse down?>>> then\n        change [xの力 v] by (0.9)\n        point in direction (90)\n    end\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<<<(x position) > (mouse x)> and <not <(mouse x) > [200]>>> or <[-200] > (mouse x)>> and <mouse down?>>> then\n        change [xの力 v] by (-0.9)\n        point in direction (-90)\n    end\n    set [xの力 v] to ((xの力) * (0.88))\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 (-4)\n                        change x by ((xの力) * (-1))\n                        if <<<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <key (space v) pressed?>> or <<<(mouse y) > (y position)> or <(mouse y) > [140]>> and <mouse down?>>> then\n                            set [yの力 v] to [11]\n                            if <(xの力) > [0]> then\n                                set [xの力 v] to [-5]\n                            else\n                                set [xの力 v] to [5]\n                            end\n                        else\n                            set [xの力 v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\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 (w v) pressed?> or <key (up arrow v) pressed?>> or <key (space v) pressed?>> or <<<(mouse y) > (y position)> or <(mouse y) > [140]>> and <mouse down?>>>> then\n        set [yの力 v] to [13]\n    end\n    if <<touching (sea v)?> and <<<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <key (space v) pressed?>> or <<<(mouse y) > (y position)> or <(mouse y) > [140]>> and <mouse down?>>>> then\n        change [yの力 v] by (3)\n    end\n    change y by (1)\n    if <<(y position) < [-180]> or <<touching (海底火山 v)?> or <touching (とがった岩 v)?>>> then\n        set [xの力 v] to [0]\n        set [yの力 v] to [0]\n        go to x: (-200) y: ((<(Level) = [9]> * (-320)) + (200))\n        point in direction (90)\n    end\n    if <touching (気泡 v)?> then\n        change [yの力 v] by ((0.7) + (<(yの力) < [6]> * (1.8)))\n    end\nend\n\n@気泡\n\nwhen flag clicked\nhide\nset [level v] to [1]\nset [i v] to [0]\nset [ghost v] effect to (100)\npoint in direction (90)\nforever\n    if <not <(item (Level) of [数リスト v]) = []>> then\n        set [my_level v] to (Level)\n        set [j v] to (i)\n        repeat until <(item (Level) of [数リスト v]) = []>\n            クローン\n            wait (0.06) seconds\n        end\n    end\nend\n\ndefine クローン\nset [i v] to (j)\nrepeat (item (Level) of [数リスト v])\n    change [i v] by (1)\n    go to x: (pick random (item (i) of [位置リスト v]) to (item (i) of [位置リスト2 v])) y: (item (i) of [yリスト v])\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (<(pick random (1) to (5)) = [1]> + (1))\nset size to (pick random (10) to (15)) %\ngo to [back v] layer\ngo [forward v] (1) layers\nclear graphic effects\nshow\nrepeat (item (i) of [距離リスト v])\n    change y by (3)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (3)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <not <(Level) = (My_level)>> then\n        delete this clone\n    end\nend\n\n@海底火山\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@とがった岩\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@サムネ\n\nwhen flag clicked\nhide\n\n@ボタン\n\nwhen this sprite clicked\nset [restart v] to [1]\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        hide\n    else\n        show\n    end\nend\n\n
>>>My studio\n◇hiron0413's platformer◇\nhttps://scratch.mit.edu/studios/27006005/\n\n---------------操作方法---------------\n\n　　〔パソコン〕\nA,Dキー or ←,→キー で移動\nWキー or ↑キーでジャンプ\nUse A,D keys or ←,→ keys to move\nUse W key or ↑key to jump\n\n〔スマホ・タブレット〕\n左側・右側をタップして移動、\n上側をタップしてジャンプ\nTap left / right side to move\nTap on the top to jump\n