Adding death zone to pesticide
This commit is contained in:
parent
0127257d05
commit
e88b2248b3
13 changed files with 177 additions and 8 deletions
11
scenes/scripts/pesticide.gd
Normal file
11
scenes/scripts/pesticide.gd
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
extends Polygon2D
|
||||
class_name Pesticide
|
||||
|
||||
@onready var death_box = $DeathBox
|
||||
|
||||
func _ready():
|
||||
death_box.connect("body_entered", Callable(self, "_on_body_entered"))
|
||||
|
||||
func _on_body_entered(area):
|
||||
if area.is_in_group("bee"):
|
||||
area.die()
|
||||
Loading…
Add table
Add a link
Reference in a new issue