public class BaseSingle<T> where T:new()
{
private static T instance;
public static GetInstance(){
if(instance == null){
instance = new T();
}
return instance;
}
}
public class GameManager :BaseSingle<GameManager>{
}
public class BaseSingle<T> where T:new()
{
private static T instance;
public static GetInstance(){
if(instance == null){
instance = new T();
}
return instance;
}
}
public class GameManager :BaseSingle<GameManager>{
}