123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Windows.Forms;
- using System.IO;
- using CommonAI.Zone.ZoneEditor;
- using GameEditorPlugin.Win32.Runtime;
- namespace CommonAIEditor
- {
- public interface IGameEditorPlugin
- {
- string Name { get; }
- /// <summary>
- /// 编辑器入口
- /// </summary>
- string DataRoot { get; set; }
- /// <summary>
- /// 游戏扩展DLL
- /// </summary>
- string PluginDLL { get; set; }
- /// <summary>
- /// 构造场景编辑器插件
- /// </summary>
- /// <param name="default_plugin"></param>
- /// <returns></returns>
- ISceneEditorPlugin CreateScenePlugin(IGameEditorPlugin default_plugin);
- /// <summary>
- /// 运行游戏测试
- /// </summary>
- /// <param name="default_plugin"></param>
- /// <param name="data_dir"></param>
- /// <param name="sceneID"></param>
- /// <param name="actorTemplateID"></param>
- void RunTest(IGameEditorPlugin default_plugin, string data_dir, int sceneID, int actorTemplateID);
- /// <summary>
- /// 运行资源查看功能
- /// </summary>
- /// <param name="default_plugin"></param>
- /// <param name="filepath"></param>
- void RunModelView(IGameEditorPlugin default_plugin, string[] filepath);
- /// <summary>
- /// 可接受的资源类型
- /// </summary>
- /// <param name="default_plugin"></param>
- /// <param name="filename"></param>
- /// <returns></returns>
- bool AcceptResource(IGameEditorPlugin default_plugin, string filename);
- /// <summary>
- /// 构造Win32测试工具
- /// </summary>
- /// <param name="default_plugin"></param>
- /// <param name="data_dir"></param>
- /// <param name="sceneID"></param>
- /// <param name="recorder"></param>
- /// <returns></returns>
- void RunLocalPlay(IGameEditorPlugin default_plugin, DirectoryInfo data_dir, int sceneID, bool recorder);
- /// <summary>
- /// 构造Win32测试工具
- /// </summary>
- /// <param name="default_plugin"></param>
- /// <param name="data_dir"></param>
- /// <param name="sceneID"></param>
- /// <returns></returns>
- void RunServerPlay(IGameEditorPlugin default_plugin, DirectoryInfo data_dir, int sceneID);
- }
- public delegate void PluginMessageHandler(object data);
- public delegate SceneObjectData CallAddSceneObject(Type type, Action<SceneObjectData> callback);
- public delegate SceneObjectData CallResetSceneObject(string name, Action<SceneObjectData> callback);
- public interface ISceneEditorPlugin
- {
- bool EnableRight { get; }
- Control AsControl();
- void SendMessage(object data);
- event PluginMessageHandler OnGetPluginMessage;
- event CallAddSceneObject CallAddObject;
- event CallResetSceneObject CallResetObject;
- }
- }
|