ld-39-jam/ExplosionEffect.gd

15 lines
279 B
GDScript3
Raw Normal View History

2017-08-11 22:50:56 +01:00
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