public static void CallSaveToBase() { if (GlobalScheduler.InstanceExists() && Application.isPlaying) { GlobalScheduler.CallFunction(GlobalScheduler.Instance.gameObject, new Delegates.FunctionPointer(SaveToBase), 0.2f, false); } else { SaveToBase(); } }
protected virtual void InitialRecalcCorrector() { //Prevent Bugs when other objects mass change after this late update cycle //When not paused if (GlobalScheduler.InstanceExists()) { GlobalScheduler.CallFunction(this.gameObject, new Delegates.FunctionPointer(RecalcSelfMass), 0.7f, false); GlobalScheduler.CallFunction(this.gameObject, new Delegates.FunctionPointer(RecalcOthersMass), 0.7f, false); GlobalScheduler.CallFunction(this.gameObject, new Delegates.FunctionPointer(RecalcRopesMass), 0.7f, false); } //and after Pause Invoke("RecalcSelfMass", 0.05f); Invoke("RecalcOthersMass", 0.05f); }