This repository has been archived on 2025-09-12. You can view files and clone it, but cannot push or open issues or pull requests.
ld47/objects/Fire.gd
2020-10-05 02:13:04 +02:00

21 lines
392 B
GDScript

extends Spatial
var emitting: bool = false
var character: Node
func _ready():
pass
func _process(delta):
$Particles.emitting = emitting
$Light.visible = emitting
if character and emitting:
character.die("fire")
func _on_Area_body_entered(body):
if body.has_method("die"):
character = body
func _on_Area_body_exited(body: Node) -> void:
if body == character:
character = null