using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// 核心模块,实现业务逻辑 /// public class ModuleCore : Module { } /// /// 模块基类 /// /// public class Module where ModuleCore : Module, new() { /// 模块单例 public static ModuleCore I => Instantiate(); private static ModuleCore core; private static ModuleCore Instantiate() => core == null ? core = new ModuleCore() : core; }