bug
This commit is contained in:
parent
6809a3733a
commit
1f44bce864
14 changed files with 245 additions and 10 deletions
|
|
@ -5,7 +5,7 @@ extends CharacterBody2D
|
|||
@export_group("Movement", "move_")
|
||||
@export var move_normal_speed: float
|
||||
@export var move_focused_speed: float
|
||||
|
||||
@onready var startpos = position
|
||||
|
||||
var focused: bool:
|
||||
get(): return Input.is_action_pressed(&"focus")
|
||||
|
|
@ -15,5 +15,9 @@ func _physics_process(delta: float) -> void:
|
|||
var input_dir = Input.get_vector(&"move_left", &"move_right", &"move_up", &"move_down").sign()
|
||||
|
||||
velocity = input_dir.normalized() * (move_focused_speed if focused else move_normal_speed)
|
||||
|
||||
move_and_slide()
|
||||
|
||||
|
||||
func _on_hurtbox_area_entered(area: Area2D) -> void:
|
||||
%DeathSound.play()
|
||||
position = startpos
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue