Night ||A Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [TheFatRat、Laura Brehm - Monody \(纯音乐\) v] until done\n    wait (1) seconds\nend\n\n@角色1\n\nwhen flag clicked\nset rotation style [left-right v]\ngo to x: (-175) y: (-130)\nset [yv v] to [0]\nset [jump function v] to [0]\nforever\n    change y by (Yv)\n    change [yv v] by (-1)\n    touch_ground <[0] < (Yv)>\n    if <<(jump function) < [3]> and <key (up arrow v) pressed?>> then\n        set [yv v] to [12]\n    end\n    if <touching color (#ffe900)?> then\n        set [yv v] to [24]\n    end\nend\n\ndefine touch_ground <up?>\nchange [jump function v] by (1)\nrepeat until <not <touching (platform v)?>>\n    set [yv v] to [0]\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [jump function v] to [0]\n    end\nend\n\ndefine walk (direct) (speed)\npoint in direction (direct)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<not <touching (platform v)?>> or <(slope) = [8]>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by (() - (speed))\n    change y by (() - (slope))\nend\n\nwhen flag clicked\nforever\n    if <key (left arrow v) pressed?> then\n        walk [-90] [-5]\n    end\n    if <key (right arrow v) pressed?> then\n        walk [90] [5]\n    end\nend\n\nwhen flag clicked\nforever\n    wait until <<<(x position) > [235]> or <key (1 v) pressed?>> and <not <(关卡) = [18]>>>\n    broadcast (下一关 v)\n    wait until <not <key (1 v) pressed?>>\nend\n\nwhen I receive [下一关 v]\nchange [关卡 v] by (1)\ngo to x: (-175) y: (-130)\n\nwhen flag clicked\nset [ghost v] effect to (99)\nforever\n    if <<touching color (#ff0000)?> or <(y position) < [-175]>> then\n        go to x: (-175) y: (-130)\n    end\nend\n\n@platform\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (99)\nset [关卡 v] to [1]\nforever\n    switch costume to (关卡)\nend\n\n@platform2\n\nwhen flag clicked\nset [brightness v] effect to (0)\ngo to x: (0) y: (0)\nset [关卡 v] to [1]\nforever\n    switch costume to (关卡)\nend\n\n@角色2\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    go to (角色1 v)\n    point in direction ([direction v] of [角色1 v])\nend\n\nwhen flag clicked\nswitch costume to (造型1 v)\nforever\n    wait (pick random (2) to (3)) seconds\n    next costume\n    wait (0.05) seconds\n    next costume\n    wait (0.1) seconds\n    next costume\n    wait (0.05) seconds\n    next costume\nend\n\n@star\n\ndefine star appear (size) (x) (y) (虚像) (消失时间)\nset size to (size) %\ngo to x: (x) y: (y)\nset [ghost v] effect to (虚像)\nrepeat (消失时间)\n    change [ghost v] effect by (5)\nend\n\nwhen flag clicked\nhide\nforever\n    克隆 (pick random (20) to (35)) 次\nend\n\ndefine 克隆 (x) 次\nrepeat (10)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nstar appear [90] (pick random (-230) to (230)) (pick random (-170) to (170)) [50] [10]\ndelete this clone\n\n@blank\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n