31 lines
460 B
GDScript
31 lines
460 B
GDScript
extends BaseBlock
|
|
|
|
|
|
class_name UnitBlock
|
|
|
|
|
|
|
|
#单位的数据
|
|
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
|