sunflowers-in-the-rain/objects/obj_heartup/Step_0.gml

12 lines
388 B
Plaintext

if (!place_meeting( x + lengthdir_x( dspeed, direction ), y, obj_wall ) ) { x += lengthdir_x( dspeed, direction );
} else {
direction = 180 - direction;
x += lengthdir_x( dspeed, direction );
}
if (!place_meeting( x, y + lengthdir_y( dspeed, direction ), obj_wall ) ) {
y += lengthdir_y( dspeed, direction );
} else {
direction = -direction;
y += lengthdir_y( dspeed, direction );
}