[Old project] Rainbow- A mobile friendly platformer
@Stage\n\nwhen flag clicked\n\n    play sound [Garden v] until done\nend\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (rainbow1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Sprite2\n\ndefine Tick\nif <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > [10]>>> then\n    change [xv v] by (1)\n    switch costume to (costume1 v)\nend\nif <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [-10]>>> then\n    change [xv v] by (-1)\n    switch costume to (costume2 v)\nend\nchange x by (Xv)\nset [xv v] to ((Xv) * (0.9))\nif <touching color (#ff0000)?> then\n    change y by (1)\n    if <touching color (#ff0000)?> then\n        change y by (1)\n        if <touching color (#ff0000)?> then\n            change y by (1)\n            if <touching color (#ff0000)?> then\n                change y by (1)\n                if <touching color (#ff0000)?> then\n                    change y by (1)\n                    if <touching color (#ff0000)?> then\n                        change x by ((Xv) * (-1))\n                        change y by (-5)\n                        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                            if <(Xv) > [0]> then\n                                set [xv v] to [-10]\n                            else\n                                set [xv v] to [10]\n                            end\n                            set [yv v] to [15]\n                        else\n                            set [xv v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [yv v] by (-1)\nchange y by (Yv)\nif <touching color (#ff0000)?> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <touching color (#ff0000)?> then\n        set [yv v] to [13]\n    end\nend\nif <touching color (#ffd342)?> then\n    set [yv v] to [18]\nend\nif <touching color (#c5c5c5)?> then\n    go to x: (-163) y: (-80)\nend\nchange y by (1)\n\nwhen I receive [tick v]\nTick\n\nwhen flag clicked\ngo to x: (-163) y: (-80)\ngo to [front v] layer\nswitch costume to (costume1 v)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    broadcast (Tick v)\nend\n\nwhen flag clicked\nforever\n    if <touching color (#00f7ff)?> then\n        broadcast (next level v)\n        go to x: (-163) y: (-80)\n        go to [front v] layer\n        switch costume to (costume1 v)\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\n\n
This is mobile friendly\n\nCONTROLS:\n\n➡Left arrow key to go left\n➡Right arrow key to go right\n➡Up arrow key to jump.