Fixed a bug desyncing weapon direction and weapon hitbox. Removed angle from FPS counter.

This commit is contained in:
Melvin Weiß 2025-10-02 14:06:25 +02:00
parent beb0b697ea
commit 2d2b63fd74
3 changed files with 4 additions and 3 deletions

View file

@ -32,7 +32,7 @@ var current_hp = 5:
set(new_hp):
current_hp = new_hp
health_changed.emit(current_hp)
var max_hp = 5:
@export var max_hp = 5:
set(new_max_hp):
max_hp = new_max_hp
max_hp_changed.emit(max_hp)

View file

@ -23,7 +23,8 @@ func swing(dir_str) -> void:
scale.y = abs(scale.y)
rotation = 0
anim_sprite.visible = true
await get_tree().create_timer(0.01).timeout
await get_tree().physics_frame
await get_tree().physics_frame
slash_timer = slash_duration
func _process(delta: float) -> void:

View file

@ -1,4 +1,4 @@
extends Label
func _process(_delta):
set_text("FPS " + str(Engine.get_frames_per_second()) + ", ANGLE " + str(floor((%Player.position.angle() + PI) / TAU * 360)))
set_text("FPS " + str(Engine.get_frames_per_second()))