Adding initial doggo

This commit is contained in:
Dan Baker 2024-05-06 11:55:53 +01:00
parent 07b63a8426
commit 136b4963ea
3 changed files with 40 additions and 6 deletions

15
scenes/scripts/dog.gd Normal file
View 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