internal virtual bool Update() { if (checkRequires) { UpdateRequires(); } if (!isDone) { return(true); } if (completed == null) { return(false); } try { completed.Invoke(this); } catch (Exception ex) { GameLog.LogException(ex); } completed = null; return(false); }
/** * If the db is loaded, call the callback immediately, otherwise, register the callback */ public static void loadOrCallback(LoadedCallback loadCallback) { lock (isloadedCallback) { if (db != null) { loadCallback.Invoke(db); } else { isloadedCallback += loadCallback; } } }