You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Wiki/pages/事件系统设计.md

14 lines
838 B
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

- # 事件系统设计
现任事件系统实际思路为在项目中添加一部分基于`C#`的DSL脚本在脚本中使用封装过的人性化的API对游戏接口调用
# 类架构
- Core
- EventSystemBehavior
- 事件系统的行为类,将触发器等功能添加到这里,并通过反射获取所有的脚本类的实例
- EventSystemScript
- 所有脚本的父类,在其中添加大部分可用的接口,方便子类直接使用
- Scripts
- 策划自行编写脚本实现自己需要的功能
# 模板
参考[`EventSystem.Scripts.贵族社交.闲暇小聚`](https://dev.azure.com/KnightOfTheArk/_git/KnightOfTheArk?path=/EventSystem/Scripts/%E8%B4%B5%E6%97%8F%E7%A4%BE%E4%BA%A4/%E9%97%B2%E6%9A%87%E5%B0%8F%E8%81%9A.cs)这个类
# 参考
游戏内所有事件位于`TaleWorlds.CampaignSystem.CampaignEvents`类中