feat: implement foundational weapon systems, including hitscan and projectile base classes, reload mechanics, and player movement/camera integration.
This commit is contained in:
@@ -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)
|
||||
@@ -0,0 +1 @@
|
||||
uid://c5eanbqnnm4kn
|
||||
Reference in New Issue
Block a user