实验用品编辑器说明文档

实验用品编辑器说明文档


器材创建模块迁移

<p>[toc]</p> <h3>迁移内容一览</h3> <table> <thead> <tr> <th>模块</th> <th>备注</th> </tr> </thead> <tbody> <tr> <td>初始化模块</td> <td>完成</td> </tr> <tr> <td>器材创建模块</td> <td>完成</td> </tr> <tr> <td>LUA回调模块</td> <td>完成</td> </tr> <tr> <td>器材管理模块</td> <td>完成</td> </tr> </tbody> </table> <h3>模块说明</h3> <h4>初始化模块</h4> <pre><code>1.初始化资源中心配置 InitResourcePlatform(bool isNewModule, string resCacheDir) 2.初始化引擎 InitEngine(); 3.初始化交互组件 InitInteractor();</code></pre> <h4>创建器材模块</h4> <h5>创建单一器材</h5> <h5>创建组合器材</h5> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=29c0744a89c2f19cd61b57b109c1a04f&amp;amp;file=file.png" alt="" /></p> <pre><code class="language-plantuml">@startuml class EquipmentLoader { CreateEquipment() } class AgentComponent_CreatElement { OnCreateSlaveObjectOnLab() } class CreatElement { OnCreateSlaveObjectOnLab() } EquipmentLoader --&amp;gt; AgentComponent_CreatElement AgentComponent_CreatElement --&amp;gt; CreatElement @enduml</code></pre> <pre><code>在创建组合器材时LUA会依赖下面这2个AC接口,目前这2个接口是放在PlayCore中的,需要剥离出来,并将LUA中的所有调用都替换 AgentComponent_ScenceLabMgr AgentComponent_CreatElement</code></pre> <h4>器材管理模块</h4> <pre><code>LabObjectIdManager和LabObjectManager 存放了器材和器材信息的管理,需要从playcore剥离</code></pre> <h3>LUA变更</h3> <h4>1.依赖PlayCore的回调函数替换</h4> <pre><code>LUA基类AgentClassConfig.xml新增引用 &amp;lt;AgentComponent name=&amp;quot;AgentSystemExtension.AgentComponent_EquipmentPlayerUIData&amp;quot;/&amp;gt; &amp;lt;AgentComponent name=&amp;quot;AgentSystemExtension.AgentComponent_EquipmentPlayerCreatElement&amp;quot;/&amp;gt;</code></pre> <pre><code>LabControlAgent.lua中 --self.UIData:AddListenerOnCreateLabObject(LabControlAgent.OnCreateLuaElementsByType) self.EquipmentPlayerUIData:AddListenerOnCreateLabObject(LabControlAgent.OnCreateLuaElementsByType) --self.UIData:AddListenerOnDestroyLabObject(LabControlAgent.OnDestroyLabObject) self.EquipmentPlayerUIData:AddListenerOnDestroyLabObject(LabControlAgent.OnDestroyLabObject) </code></pre> <pre><code>BaseAgent.lua中 self.realAgent.CreatElement:OnCreateSlaveObjectOnLab 都替换为 self.realAgent.EquipmentPlayerCreatElement:OnCreateSlaveObjectOnLab</code></pre> <h3>备用</h3> <pre><code>一些依赖PlayCore的数据 PlayCore下的Serialization文件夹迁移过来</code></pre>

页面列表

ITEM_HTML