using System.Collections; using System.Collections.Generic; using UnityEngine; namespace MuHua { /// /// 单例基类 /// public class Module where T : Module, new() { /// 模块单例 public static T I => Instantiate(); protected static T instance; protected static T Instantiate() => instance == null ? instance = new T() : instance; } }