Adding initial doggo
This commit is contained in:
parent
07b63a8426
commit
136b4963ea
3 changed files with 40 additions and 6 deletions
15
scenes/scripts/dog.gd
Normal file
15
scenes/scripts/dog.gd
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
extends Node2D
|
||||
class_name Dog
|
||||
|
||||
@onready var death_box = $DeathBox
|
||||
|
||||
var acquired_target : Bee = null
|
||||
|
||||
func _ready():
|
||||
death_box.connect("body_entered", Callable(self, "_on_body_entered"))
|
||||
|
||||
func _on_body_entered(area):
|
||||
if area.is_in_group("bee"):
|
||||
if !acquired_target:
|
||||
Log.pr("Acquired target")
|
||||
acquired_target = area
|
||||
Loading…
Add table
Add a link
Reference in a new issue