You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AM2Rogue/Export_Code/gml_Object_oBattery_Draw_0.gml

14 lines
506 B

var xoff, yoff;
if (!shaking)
draw_sprite_ext(sprite_index, -1, x, y, 1, 1, image_angle, -1, 1)
if shaking
{
xoff = random_range(-1, 1)
yoff = random_range(-1, 1)
draw_sprite_ext(sprite_index, -1, (x + xoff), (y + yoff), image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1)
draw_set_blend_mode(bm_add)
repeat (3)
draw_sprite_ext(sprite_index, -1, (x + xoff), (y + yoff), image_xscale, 1, image_angle, -1, (1 - (fxtimer * 0.25)))
draw_set_blend_mode(bm_normal)
}