weapon system rework

This commit is contained in:
Rendo 2025-11-26 16:32:09 +05:00
commit 30b01100f0
27 changed files with 352 additions and 190 deletions

View file

@ -26,6 +26,8 @@ const MAX_HP = 100
@export var TOGGLE_CROUCH: bool = true
@export var WALK_MODIFIER: float = 0.5
@export var crouched: bool = false:
set(value):
if value != crouched and stand_up_area.has_overlapping_bodies() == false:
@ -36,6 +38,8 @@ const MAX_HP = 100
get:
return crouched
@onready var TEMP_start_pos = global_position
var potential_crouched: bool = crouched
func _enter_tree() -> void:
@ -89,4 +93,5 @@ func _input(event: InputEvent) -> void:
crouched = false
func die() -> void:
queue_free()
global_position = TEMP_start_pos
hp = MAX_HP