ld-39-jam/BulletImpact.gd

17 lines
282 B
GDScript

extends Sprite
var current_time = 0
var frames_per_second = 0.05
func _ready():
set_process(true)
func _process(delta):
if int(current_time / frames_per_second) >= get_hframes() - 1:
queue_free()
set_frame(int(current_time / frames_per_second))
current_time += delta