| 1234567891011121314151617181920212223242526272829303132333435 |
- if image_index + animation_spd < image_number
- image_index += animation_spd;
- if apply_gravity
- y_spd += global.g * global.time_scale;
- if place_meeting(x, y + y_spd, oParentSolid)
- {
- while !place_meeting(x, y + sign(y_spd), oParentSolid)
- y += sign(y_spd);
-
- if y_spd > 2
- {
- y_spd *= -restitution;
- x_spd *= restitution;
- }
- else
- {
- y_spd = 0;
- x_spd = 0;
- }
- }
- y += y_spd * global.time_scale;
- if place_meeting(x + x_spd, y, oParentSolid)
- x_spd *= -restitution;
- x += x_spd * global.time_scale;
- image_angle += point_distance(0, 0, x_spd, y_spd);
- image_alpha -= 0.001;//
- if image_alpha <= 0
- instance_destroy();
|