challenge-editor/class/2dFightBlock/unit_block.gd

31 lines
460 B
GDScript3
Raw Permalink Normal View History

2024-11-29 01:02:57 +08:00
extends BaseBlock
class_name UnitBlock
2024-12-12 19:09:32 +08:00
2024-11-29 01:02:57 +08:00
#单位的数据
var unit_data:Dictionary={}
#行动点数
var action_num:int=5
#可以使用的动作
var could_use_action:Array[BlockAction]
#被创建时重定义数据
func _on_create():
self.walkable=false
self.could_be_used_for_target=true
super._on_create()
func get_all_choice()->Array:
var res=[]
for i in could_use_action:
res.append(i.action_name)
return res
func turn():
action_num=5
pass