21 lines
392 B
GDScript
21 lines
392 B
GDScript
extends Area2D
|
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
$col.polygon = $shape.polygon
|
|
connect("body_entered",self,"entered")
|
|
connect("body_exited",self,"exited")
|
|
|
|
|
|
func entered(body):
|
|
body.inacid = true
|
|
|
|
func exited(body):
|
|
body.inacid = false
|
|
|
|
|
|
func _on_AcidButton_toggled(button_pressed):
|
|
visible = button_pressed
|
|
monitoring = button_pressed
|