numeric mods

This commit is contained in:
Rendo 2025-07-26 18:32:16 +05:00
commit 5246d8481d
11 changed files with 185 additions and 0 deletions

View file

@ -0,0 +1,21 @@
extends Resource
class_name NumericModifiers
@export var flat_value : float
@export var percentage_value : float
@export var mult_value : float
var value:
get():
return get_value()
func _init(flat : float = 0, per : float = 0, mult : float = 1) -> void:
flat_value = flat
percentage_value = per
mult_value = mult
resource_local_to_scene = true
func get_value() -> float:
return flat_value * mult_value * (1.0 + percentage_value)