sheep attacc
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user