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

public abstract class Singletone <T> where T : Singletone<T>, new() {
    protected static T instance = null;
 
    public static T Instance {
        get {
            if (instance == null) {
                instance = new T();
                instance.Init();
            }
            return instance;
        }
    }

    protected virtual void Init() {}
}