namespace IFramework { /// /// 默认的模块的优先级 /// public struct ModulePriority:IValueContainer { /// /// 配置表 /// public const int Config = 0; /// /// 环境等待 /// public const int Loom = 10; /// /// undo /// public const int Recorder = 30; /// /// 协程 /// public const int Coroutine = 70; /// /// 消息转发 /// public const int Message = 120; /// /// ecs /// public const int ECS = 400; /// /// fsm /// public const int FSM = 500; /// /// 计时器 /// public const int Timer = 600; /// /// 其他 /// public const int Custom = 1000; private int _value; /// /// ctor /// /// public ModulePriority(int value) { _value = value; } /// /// 具体的值 /// public int value { get { return _value; }set { _value = value; } } /// /// /// /// /// public static ModulePriority FromValue(int value) { return new ModulePriority(value); } /// /// /// /// public static implicit operator int(ModulePriority value) { return value.value; } /// /// /// /// public static implicit operator ModulePriority(int value) { return new ModulePriority(value); } /// /// /// /// /// /// public static ModulePriority operator +(ModulePriority a, ModulePriority b) { return new ModulePriority(a.value + b.value); } /// /// /// /// /// /// public static ModulePriority operator -(ModulePriority a, ModulePriority b) { return new ModulePriority(a.value - b.value); } } }