extends Resource
class_name VFXSignalBinding

@export var target_node: NodePath
@export var signal_name: StringName

@export var vfx_scene: PackedScene

## VFX 播放位置来源
enum SpawnSpace {
	
	##如果是跟随Target，不需要额外的参数
	TARGET_NODE,
	
	##如果是直接Spawn在World，需要提供一个额外的全局坐标
	WORLD_POSITION,
}

## VFX 播放的层级
enum SpawnLayer
{
	LOCAL,
	GLOBAL
}

@export var spawn_space := SpawnSpace.TARGET_NODE
@export var offset := Vector2.ZERO
@export var debug_print:= false 

func get_debug_message() -> String:
	var target_str = "UnknownTarget" if target_node.is_empty() else str(target_node)
	var signal_str = "UnknownSignal" if signal_name.is_empty() else str(signal_name)
	return "[VFX] Spawned triggered by signal \"%s\" on node \"%s\"" % [signal_str, target_str]
