28 lines
437 B
C#
28 lines
437 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>֪ʶ<D6AA><CAB6><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֪ʶ
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
public class BaseManager<T> where T:new()//<2F><><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ι<DEB2><CEB9>캯<EFBFBD><ECBAAF>
|
|||
|
{
|
|||
|
private static T instance;
|
|||
|
|
|||
|
public static T GetInstance()
|
|||
|
{
|
|||
|
if(instance == null)
|
|||
|
{
|
|||
|
instance = new T();
|
|||
|
}
|
|||
|
return instance;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public class Gam : BaseManager<Gam>
|
|||
|
{
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|