extends Node

func _ready():
	var image = Image.create(128, 128, false, Image.FORMAT_RGBA8)
	
	# Draw explosion
	for x in range(128):
		for y in range(128):
			var distance = Vector2(x - 64, y - 64).length()
			if distance < 60:
				var alpha = 1.0 - (distance / 60.0)
				image.set_pixel(x, y, Color(1.0, 0.5, 0.0, alpha))  # Orange color
	
	# Save the image
	var error = image.save_png("res://assets/images/explosion.png")
	if error != OK:
		print("Error saving explosion image: ", error)
	
	queue_free() 