[#7]Skyline - スカイライン Mobile Platformer #nhk

Instructions: •Arrow keys, WASD keys, and touch the screen to move.\n•Avoid spikes and lava.\n•Aim a high score and comment your time.\n\n•矢印キー、WASDキー、画面タッチで操作\n•とげとマグマを避けよう\n•ハイスコアを狙い、あなたのタイムをコメントしよう\n\nNHKワイワイプログラミングの「みんなのプログラム」の応募作品ですー\nちなみに自己最高タイムは40.352です。\n超えられるかn(((殴

@Stage\n\nwhen flag clicked\nforever\n    if <not <(level) = [10]>> then\n        switch backdrop to (1 v)\n    else\n        switch backdrop to (10 v)\n    end\nend\n\n@Player\n\nwhen flag clicked\nshow list [time v]\nhide\n\nwhen I receive [spikes v]\nstart sound [Rip v]\nstart position\n\nwhen I receive [finish v]\ngo to x: (0) y: (0)\nhide\n\ndefine start position\npoint in direction (90)\ngo to x: (-210) y: (15)\nset size to (90) %\nshow\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\nset rotation style [left-right v]\nswitch costume to (1 v)\nstart position\nset [ghost v] effect to (0)\ngo to [front v] layer\ngo [backward v] (8) layers\nforever\n    if <(player's moving) = [n]> then\nend\n\n@Level\n\nwhen I receive [finish v]\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nset size to (100) %\nshow\nforever\n    set [ghost v] effect to (0)\n    switch costume to (level)\nend\n\n@Spikes and Lava\n\nwhen I receive [finish v]\ngo to x: (0) y: (0)\nhide\n\ndefine x : 0  y : 0  表示する (コスチュームno.)\nswitch costume to (コスチュームno.)\ngo to x: (0) y: (0)\nshow\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (6) layers\nforever\n    if <<(level) = [1]> or <(level) = [10]>> then\n        hide\n    end\n    if <(level) = [2]> then\n        x : 0  y : 0  表示する [2]\n    end\n    if <(level) = [3]> then\n        x : 0  y : 0  表示する [3]\n    end\n    if <(level) = [4]> then\n        x : 0  y : 0  表示する [4]\n    end\n    if <(level) = [5]> then\n        x : 0  y : 0  表示する [5]\n    end\n    if <(level) = [6]> then\n        x : 0  y : 0  表示する [6]\n    end\n    if <(level) = [7]> then\n        x : 0  y : 0  表示する [7]\n    end\n    if <(level) = [8]> then\n        x : 0  y : 0  表示する [8]\n    end\n    if <(level) = [9]> then\n        x : 0  y : 0  表示する [9]\n    end\nend\n\n@BGM\n\nwhen flag clicked\nstop all sounds\nforever\n    play sound [bgm v] until done\nend\n\n@Timer\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        delete all of [time v]\n        set [time_バグ修正用 v] to (timer)\n        add (time_バグ修正用) to [time v]\n        if <(time_バグ修正用) > [65]> then\n            add [Rank : s ᴀ ʙ ᴄ ᴅ E] to [time v]\n        else\n            if <(time_バグ修正用) < [65]> then\n                if <(time_バグ修正用) < [59]> then\n                    if <(time_バグ修正用) < [54]> then\n                        if <(time_バグ修正用) < [48]> then\n                            if <(time_バグ修正用) < [45]> then\n                                add [Rank : S ᴀ ʙ ᴄ ᴅ ᴇ] to [time v]\n                            else\n                                add [Rank : s A ʙ ᴄ ᴅ ᴇ] to [time v]\n                            end\n                        else\n                            add [Rank : s ᴀ B ᴄ ᴅ ᴇ] to [time v]\n                        end\n                    else\n                        add [Rank : s ᴀ ʙ C ᴅ ᴇ] to [time v]\n                    end\n                else\n                    add [Rank : s ᴀ ʙ ᴄ D ᴇ] to [time v]\n                end\n            else\n            end\n        end\n        wait until <not <(level) = [10]>>\n    else\n    end\nend\n\nwhen flag clicked\ndelete all of [time v]\nshow list [time v]\nreset timer\n\nwhen I receive [tiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiime v]\nhide list [time v]\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n@Detector\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\nwhen I receive [finish v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\ngo to [front v] layer\ngo [forward v] (1) layers\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to x: (-2) y: (0)\nswitch costume to (1 v)\nset [ghost v] effect to (100)\nrepeat (100)\n    change [ghost v] effect by (-5)\nend\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Effect_Background\n\nhide\nset [s2 v] to (pick random (0.1) to (1))\npoint in direction (pick random (0) to (360))\ngo to (random position v)\nwait until <(timer) > [2]>\nshow\nset size to (pick random (1) to (15)) %\nset [ghost v] effect to (pick random (20) to (50))\nrepeat until <(timer) > [6.1 ]>\n    go to [front v] layer\n    turn right (0.25) degrees\n    move ((s2) / (3)) steps\nend\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (2) layers\nhide\nforever\n    switch costume to (pick random (1) to (3))\n    create clone of (_myself_ v)\n    wait (pick random (2) to (3.2)) seconds\nend\n\nwhen I start as a clone\nset [ghost v] effect to (pick random (75) to (85))\ngo to x: (250) y: (pick random (160) to (-15))\nshow\nrepeat (267)\n    change x by (-2)\nend\ndelete this clone\n\nset [s2 v] to (pick random (0.1) to (1))\npoint in direction (pick random (0) to (360))\ngo to (random position v)\n\nset size to (pick random (75) to (125)) %\nrepeat (250)\n    go to [back v] layer\n    go [backward v] (1) layers\n    turn right (0.25) degrees\n    move ((s2) / (3)) steps\nend\n\nwait until <(timer) > [2]>\n\n@Effect_Lava\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (2) layers\nforever\n    switch costume to (level)\n    show\n    set [ghost v] effect to (50)\nend\n\ngo to x: (0) y: (0)\n\n@Effect_Airplane\n\nwhen flag clicked\ngo to [back v] layer\nset [ghost v] effect to (50)\nhide\nset size to (50) %\nswitch costume to (3 v)\ngo to x: (210) y: (pick random (-44) to (-124))\nforever\n    set [〜歩動かす v] to (pick random (1.00) to (3.00))\n    wait (pick random (10) to (30)) seconds\n    show\n    point in direction (pick random (-60) to (-85))\n    move (〜歩動かす) steps\n    repeat until <touching (_edge_ v)?>\n        move (〜歩動かす) steps\n    end\n    go to x: (180) y: (pick random (0) to (-99))\n    hide\nend\n\nwhen I start as a clone\n\nif <not <(pick random (0) to (2)) = [1]>> then\n    next costume\nend\n\npoint in direction (-60)\n\nrepeat (7)\n    change [ghost v] effect by (50)\n    wait (0.025) seconds\n    set size to ((size) - (10)) %\nend\ndelete this clone\n\ncreate clone of (_myself_ v)\n\nshow\n\n@Effect_Background_Mountains\n\nwhen flag clicked\nswitch costume to (2 v)\ngo to [back v] layer\ngo [forward v] (1) layers\nshow\n\n@Next\n\nwhen flag clicked\nset [player's moving v] to [y]\nhide\n\nwhen I receive [neeeeeeeeeeeeeeeeeeeeeeeeeext v]\nif <not <(level) = [10]>> then\n    set [ghost v] effect to (0)\n    switch costume to (next_3 v)\n    go to [front v] layer\n    go [backward v] (1) layers\n    set [player's moving v] to [n]\n    go to x: (-381) y: (0)\n    set size to (100) %\n    show\n    repeat until <(x position) > [1]>\n        change x by (((2) - (x position)) / (4))\n    end\n    repeat until <(x position) > [381]>\n        change x by (((2) + (x position)) / (4))\n    end\n    hide\n    set [player's moving v] to [y]\nelse\n    set [ghost v] effect to (0)\n    switch costume to (finish_3 v)\n    go to [front v] layer\n    go [backward v] (1) layers\n    go to x: (-381) y: (0)\n    set size to (100) %\n    show\n    repeat until <(x position) > [1]>\n        change x by (((2) - (x position)) / (4))\n    end\n    repeat until <(x position) > [381]>\n        change x by (((2) + (x position)) / (4))\n    end\n    hide\n    broadcast (tiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiime v)\nend\n\nwhen I start as a clone\nrepeat (7)\n    change [ghost v] effect by (15)\n    change [brightness v] effect by (1.5)\nend\ndelete this clone\n\n