temporary commit
This commit is contained in:
parent
8165cda61c
commit
84b689b819
14 changed files with 167 additions and 40 deletions
|
@ -1,9 +1,13 @@
|
|||
extends CharacterBody3D
|
||||
|
||||
|
||||
signal player_caught
|
||||
|
||||
|
||||
@export var acceleration: float
|
||||
@export var speed: float
|
||||
@export var vertical_speed: float
|
||||
@export var jumpscare: CanvasLayer
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
|
@ -24,3 +28,8 @@ func _physics_process(delta: float) -> void:
|
|||
var col = move_and_collide(velocity * delta)
|
||||
if col:
|
||||
velocity = velocity.bounce(col.get_normal())
|
||||
|
||||
|
||||
func _on_player_detector_body_entered(body: Node3D) -> void:
|
||||
if body is Player:
|
||||
player_caught.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue