forked from team-sg/hero-mark-2
15 lines
431 B
GDScript
15 lines
431 B
GDScript
extends Area2D
|
|
|
|
const SmallExplosion = preload("res://objects/enemy/boss/2600_small_explosion.tscn")
|
|
|
|
export var direction: Vector2 = Vector2.LEFT
|
|
export var speed: float = 50.0
|
|
export var damage: float = 0.0
|
|
|
|
func _physics_process(delta: float) -> void:
|
|
position += direction * speed * delta
|
|
|
|
func _exit_tree() -> void:
|
|
var explosion = SmallExplosion.instance()
|
|
explosion.position = position
|
|
get_parent().add_child(explosion)
|