mtd/Scripts/Projectiles/status_applying_projectile.gd

15 lines
361 B
GDScript3
Raw Normal View History

2024-02-22 06:22:22 +11:00
class_name StatusApplyingProjectile extends ExplosiveProjectile
2024-02-22 06:22:22 +11:00
@export var status_stats: StatusStats
2024-02-22 06:22:22 +11:00
func hit(target: CharacterBody3D) -> void:
super.hit(target)
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()
status.stats = status_stats
return status