sheep attacc

This commit is contained in:
2025-04-16 02:37:21 +02:00
parent 43321d4961
commit af1204c39a
5 changed files with 36 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
extends CharacterBody3D
signal attack
const SPEED = 3.0
const JUMP_VELOCITY = 2.5
@@ -24,3 +26,12 @@ func _physics_process(delta):
velocity.z = move_toward(velocity.z, 0, SPEED)
move_and_slide()
func _process(delta):
if Input.is_action_just_pressed("bell"):
print("bell")
var enemy = get_parent().find_child("Wolf")
print(enemy)
attack.emit(enemy.global_transform.origin)
elif Input.is_action_just_pressed("yell"):
print("yell")