任务一:单例
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BaseManager<T> where T:new()
{
public static T instane;
public static T GetInstace()
{
if (instane == null)
{
instane = new T();
}
return instane;
}
}
public class GameManager:BaseManager<GameManager>
{
}
浙公网安备 33010602011771号