36 lines
No EOL
856 B
Text
36 lines
No EOL
856 B
Text
|
|
//checks collision with the grass and changes speeds
|
|
if (place_meeting(x,y-1+launchspeedy,obj_blobleshoot_grass)) || (place_meeting(x,y+1+launchspeedy,obj_blobleshoot_grass))
|
|
{
|
|
launchspeedx = (launchspeedx *.9)
|
|
launchspeedy = (-launchspeedy * .8)
|
|
}
|
|
|
|
//checks collision with the trampoline and changes speeds
|
|
if (place_meeting(x,y-1+launchspeedy,obj_blobleshoot_trampoline)) || (place_meeting(x,y+1+launchspeedy,obj_blobleshoot_trampoline))
|
|
{
|
|
launchspeedy = ((-launchspeedy * 1.2) - 5)
|
|
//launchspeedx = (launchspeedx * 1.05)
|
|
}
|
|
|
|
|
|
|
|
//checks if the bloble has stopped moving and will end the game
|
|
if launchspeedx > 0 && launchspeedx < 1
|
|
{
|
|
global.roomset = rm_Gameover;
|
|
instance_create_depth(1,1,-1, obj_fade)
|
|
}
|
|
|
|
//Gravity!
|
|
launchspeedy = (launchspeedy + .5)
|
|
|
|
//speed limit
|
|
if launchspeedx > 100
|
|
{
|
|
launchspeedx = 100
|
|
}
|
|
|
|
|
|
x += launchspeedx
|
|
y += launchspeedy |