public static void Checkinstance() { if (_instance == null) { var obj = new GameObject("Anil Update"); _instance = obj.AddComponent <AnilUpdate>(); } }
public Timer(float defaultTime, Action endAction, int calledObjectId = 0, bool OtoReset = false, string name = "") { DefaultTime = defaultTime; this.calledObjectId = calledObjectId; time = defaultTime; EndAction = endAction; this.OtoReset = OtoReset; this.name = name; update = true; AnilUpdate.Register(this); }