parent
657bd19c77
commit
ba269df862
|
|
@ -322,7 +322,7 @@ Reward is a substructure containing the three fields of "int item_id; int count;
|
|||
|
||||
<tr align="center"><td>##var</td><td>id</td><td colspan="4">shape</td><td colspan="4">shape2</ td></tr>
|
||||
<tr align="center"><td>##type</td><td>int</td><td colspan="4">Shape</td><td colspan="4">Shape</ td></tr>
|
||||
<tr align="center"><td>##var</td><td></td><td>__type__</td><td>radius</td><td>width</td><td>height</td><td></td><td></td><td></td><td></td></tr>
|
||||
<tr align="center"><td>##var</td><td></td><td>$type</td><td>radius</td><td>width</td><td>height</td><td></td><td></td><td></td><td></td></tr>
|
||||
<tr align="center"><td/><td>1</td><td>Circle</td><td>10</td><td/><td/><td>Circle</td><td>100</td><td></td><td></td></tr>
|
||||
<tr align="center"><td/><td>2</td><td>Rectangle</td><td></td><td>10</td><td>20</td ><td>Rectangle</td><td>10</td><td>20</td><td></td></tr>
|
||||
<tr align="center"><td/><td>3</td><td>Circle</td><td>10</td><td/><td/><td>Triangle</td><td>15</td><td>15</td><td>15</td></tr>
|
||||
|
|
@ -402,14 +402,14 @@ Take the behavior tree as an example to show how to configure the behavior tree
|
|||
"executor": "SERVER",
|
||||
"blackboard_id": "demo",
|
||||
"root": {
|
||||
"__type__": "Sequence",
|
||||
"$type": "Sequence",
|
||||
"id": 1,
|
||||
"node_name": "test",
|
||||
"desc": "root",
|
||||
"services": [],
|
||||
"decorators": [
|
||||
{
|
||||
"__type__": "UeLoop",
|
||||
"$type": "UeLoop",
|
||||
"id": 3,
|
||||
"node_name": "",
|
||||
"flow_abort_mode": "SELF",
|
||||
|
|
@ -420,7 +420,7 @@ Take the behavior tree as an example to show how to configure the behavior tree
|
|||
],
|
||||
"children": [
|
||||
{
|
||||
"__type__": "UeWait",
|
||||
"$type": "UeWait",
|
||||
"id": 30,
|
||||
"node_name": "",
|
||||
"ignore_restart_self": false,
|
||||
|
|
@ -430,7 +430,7 @@ Take the behavior tree as an example to show how to configure the behavior tree
|
|||
"decorators": []
|
||||
},
|
||||
{
|
||||
"__type__": "MoveToRandomLocation",
|
||||
"$type": "MoveToRandomLocation",
|
||||
"id": 75,
|
||||
"node_name": "",
|
||||
"ignore_restart_self": false,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Luban.Job.Cfg.Defs
|
|||
|
||||
public string JsonTypeNameKey => JSON_TYPE_NAME_KEY;
|
||||
|
||||
|
||||
public string LuaTypeNameKey => LUA_TYPE_NAME_KEY;
|
||||
|
||||
public string Alias { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ local function InitTypes(methods)
|
|||
{{~end~}}
|
||||
local class = SimpleClass()
|
||||
class._id = {{bean.id}}
|
||||
class._name = '{{bean.full_name}}'
|
||||
class['{{bean.lua_type_name_key}}'] = '{{bean.full_name}}'
|
||||
local id2name = { {{for c in bean.hierarchy_not_abstract_children}} [{{c.id}}] = '{{c.full_name}}', {{end}} }
|
||||
{{~if bean.is_abstract_type~}}
|
||||
class._deserialize = function(bs)
|
||||
|
|
@ -105,7 +105,7 @@ local function InitTypes(methods)
|
|||
return o
|
||||
end
|
||||
{{~end~}}
|
||||
beans[class._name] = class
|
||||
beans[class['{{bean.lua_type_name_key}}']] = class
|
||||
end
|
||||
{{~end~}}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,21 +9,6 @@ local enums =
|
|||
{{~end~}}
|
||||
}
|
||||
|
||||
local beans = {}
|
||||
{{~ for bean in beans ~}}
|
||||
---@class {{bean.full_name}} {{if bean.parent_def_type}}:{{bean.parent}} {{end}}
|
||||
{{~ for field in bean.export_fields~}}
|
||||
---@field public {{field.convention_name}} {{lua_comment_type field.ctype}}
|
||||
{{~end~}}
|
||||
beans['{{bean.full_name}}'] =
|
||||
{
|
||||
{{~ for field in bean.hierarchy_export_fields ~}}
|
||||
{ name='{{field.convention_name}}', type='{{lua_comment_type field.ctype}}'},
|
||||
{{~end~}}
|
||||
}
|
||||
|
||||
{{~end~}}
|
||||
|
||||
local tables =
|
||||
{
|
||||
{{~for table in tables ~}}
|
||||
|
|
@ -37,4 +22,4 @@ local tables =
|
|||
{{~end~}}
|
||||
}
|
||||
|
||||
return { enums = enums, beans = beans, tables = tables }
|
||||
return { enums = enums, tables = tables }
|
||||
|
|
|
|||
Loading…
Reference in New Issue