feat: implement foundational weapon systems, including hitscan and projectile base classes, reload mechanics, and player movement/camera integration.

This commit is contained in:
DottsGit
2026-06-09 22:33:40 -04:00
parent 5102b770c8
commit f63187e493
7 changed files with 116 additions and 15 deletions
+22
View File
@@ -0,0 +1,22 @@
extends Control
class_name ReloadRing
var progress: float = 0.0:
set(val):
progress = clampf(val, 0.0, 1.0)
queue_redraw()
var radius: float = 16.0
var thickness: float = 4.0
var color: Color = Color(1.0, 1.0, 1.0, 0.8)
func _draw() -> void:
if progress <= 0.0 or progress >= 1.0:
return
# Draw background arc (darker)
draw_arc(Vector2.ZERO, radius, 0, PI * 2.0, 32, Color(0, 0, 0, 0.4), thickness, true)
# Draw progress arc
var end_angle = -PI / 2.0 + (PI * 2.0 * progress)
draw_arc(Vector2.ZERO, radius, -PI / 2.0, end_angle, 32, color, thickness, true)