feat: implement weapon system, loadout manager, and specialized projectile behaviors with associated assets

This commit is contained in:
DottsGit
2026-06-04 18:14:50 -04:00
parent c32f45a8aa
commit e6a2199777
36 changed files with 700 additions and 4 deletions
+11
View File
@@ -139,6 +139,17 @@ func spawn_damage_number(amount: float, hit_pos: Vector3) -> void:
_hit_marker_tween = create_tween()
_hit_marker_tween.tween_property(hit_marker, "modulate:a", 0.0, 0.4)
func apply_impulse(force: Vector3) -> void:
velocity += force
# Force an upward launch to break ground contact
if force.y > 0.1:
# Tiny upward bump helps move_and_slide detach from the floor
global_position.y += 0.1
func take_damage(amount: float, hit_pos: Vector3, source: Node = null) -> void:
# Show damage number for self-damage
spawn_damage_number(amount, hit_pos)
func _ensure_machine() -> MovementStateMachine:
if is_instance_valid(_machine):
return _machine