You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
493 B
GDScript
20 lines
493 B
GDScript
extends Resource
|
|
class_name CoreCfg
|
|
|
|
@export var name: String
|
|
@export var type: Enum.ECoreType
|
|
@export var skill_list: Array[SkillPlayerCfg]
|
|
|
|
var icon: Texture2D
|
|
|
|
|
|
func get_icon()->Texture2D:
|
|
if not icon:
|
|
var res_name: String = Util.get_resource_name(self)
|
|
var path: String = "res://resource/ui/icon/core/%s.png" % res_name
|
|
if ResourceLoader.exists(path):
|
|
icon = load(path) as Texture2D
|
|
else:
|
|
icon = load("res://resource/ui/icon/core/default.png") as Texture2D
|
|
return icon
|