mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-31 00:11:54 +08:00
16 lines
465 B
GDScript
16 lines
465 B
GDScript
|
|
class_name SublimateOption
|
||
|
|
|
||
|
|
var displayName: String = "升华"
|
||
|
|
var description: String = "描述"
|
||
|
|
var executor: Callable = func(_weapon: Weapon, _entity: EntityBase): return
|
||
|
|
|
||
|
|
func _init(displayNames: String, descriptions: String, executors: Callable):
|
||
|
|
displayName = displayNames
|
||
|
|
description = descriptions
|
||
|
|
executor = executors
|
||
|
|
|
||
|
|
func apply(entity: EntityBase, index: int):
|
||
|
|
var weapon = entity.weapons[index]
|
||
|
|
if weapon is Weapon:
|
||
|
|
executor.call(weapon, entity)
|