public virtual void Init(T level) { anim = AnimationManager.instance; game = GameScheduler.instance; this.level = level; group = GetComponent <CanvasGroup>(); }
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); Init(); } else { Destroy(gameObject); } }