Adds a modifier and stats system to manage combat-related attributes. Introduces StatsComponent for storing entity statistics and ModifierManager for applying dynamic modifiers. Recalculates stats based on modifier type and priority. Updates projectile and weapon components to utilize the new stats system.
11 lines
283 B
GDScript
11 lines
283 B
GDScript
@icon("res://assets/editor/64x64/fc1515.png")
|
|
extends Node2D
|
|
class_name RangedWeaponComponent
|
|
|
|
@export var stats: StatsComponent
|
|
|
|
@onready var modifier_manager = $ModifierManager
|
|
|
|
func _ready() -> void:
|
|
Log.pr("RangedWeaponComponent initialized")
|
|
modifier_manager.set_stats(stats)
|