refactor
This commit is contained in:
15
resources/effects/effect.gd
Normal file
15
resources/effects/effect.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
class_name Effect
|
||||
extends Resource
|
||||
|
||||
enum Type { BUFF, DEBUFF, AURA, DOT, HOT }
|
||||
|
||||
@export var effect_name: StringName = &""
|
||||
@export var type: Type = Type.BUFF
|
||||
@export var stat: StringName = &""
|
||||
@export var value: float = 0.0
|
||||
@export var is_multiplier: bool = false
|
||||
@export var duration: float = -1.0
|
||||
@export var aura_radius: float = 0.0
|
||||
@export var tick_interval: float = 0.0
|
||||
@export var element: int = Element.NONE
|
||||
@export var icon: Texture2D
|
||||
1
resources/effects/effect.gd.uid
Normal file
1
resources/effects/effect.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dvgpetv33u1a8
|
||||
19
resources/effects/element.gd
Normal file
19
resources/effects/element.gd
Normal file
@@ -0,0 +1,19 @@
|
||||
class_name Element
|
||||
extends RefCounted
|
||||
|
||||
const NONE: int = 0
|
||||
const FIRE: int = 1
|
||||
|
||||
static func name_of(e: int) -> String:
|
||||
match e:
|
||||
FIRE:
|
||||
return "Fire"
|
||||
_:
|
||||
return "None"
|
||||
|
||||
static func color_of(e: int) -> Color:
|
||||
match e:
|
||||
FIRE:
|
||||
return Color(1.0, 0.4, 0.1)
|
||||
_:
|
||||
return Color.WHITE
|
||||
1
resources/effects/element.gd.uid
Normal file
1
resources/effects/element.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://duxxvs1ild4we
|
||||
Reference in New Issue
Block a user