2024-02-22 06:22:22 +11:00
|
|
|
class_name StatusApplyingWeapon extends HitscanWeapon
|
2023-11-15 15:19:40 +11:00
|
|
|
|
2024-02-22 06:22:22 +11:00
|
|
|
@export var status_stats: StatusStats
|
2023-11-15 15:19:40 +11:00
|
|
|
|
|
|
|
|
2024-02-22 06:22:22 +11:00
|
|
|
func hit(target: CharacterBody3D, target_hitbox: Hitbox) -> void:
|
2023-11-15 15:19:40 +11:00
|
|
|
super.hit(target, target_hitbox)
|
|
|
|
target.status_manager.add_effect(build_status_object())
|
|
|
|
|
|
|
|
|
|
|
|
func build_status_object() -> StatusEffect:
|
2024-02-22 06:22:22 +11:00
|
|
|
var status: StatusEffect = StatusEffect.new()
|
2023-11-15 15:19:40 +11:00
|
|
|
status.stats = status_stats
|
|
|
|
return status
|