using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace TFramework
{
    /// <summary>
    /// 单例模式基类
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class SingletonBase<T> where T : class, new()
    {
        private static T _instance;

        /// <summary>
        /// 当前实例
        /// </summary>
        public static T Instance => _instance = _instance ?? new T();

    }
}
