/// <summary> /// Called when we connect to a server /// </summary> /// <param name="connection"></param> public override void Connected(BoltConnection connection) { StaticCoroutineRunner.StartStaticCoroutine(MultiplayerPlayerNameManager.DownloadDataFromFirebase()); ModBotUserIdentifier.Instance.OnLocalClientConnected(); ModsManager.Instance.PassOnMod.OnClientConnectedToServer(); }
private static void EnsureRunner() { if (runner == null) { runner = new GameObject("[Static Coroutine Runner]").AddComponent <StaticCoroutineRunner>(); UnityEngine.Object.DontDestroyOnLoad(runner.gameObject); } }
/// <summary> /// Passes the output of <see cref="LocalizationManager.GetTranslatedString(string, int)"/> into <see cref="debug.Log(string)"/> once the <see cref="LocalizationManager"/> is initialized /// </summary> /// <param name="localizationID"></param> public static void LogLocalizedStringOnceLocalizationManagerInitialized(string localizationID) { if (LocalizationManager.Instance.IsInitialized()) { debug.Log(LocalizationManager.Instance.GetTranslatedString(localizationID)); return; } if (_localizationIDsToLog == null) { _localizationIDsToLog = new Queue <string>(); } _localizationIDsToLog.Enqueue(localizationID); if (!_isLogQueueCoroutineRunning) { StaticCoroutineRunner.StartStaticCoroutine(waitForLocalizationManagerThenLogQueue()); } }
internal static void TryAddLocalizationStringToDictionary(string ID, string text) { if (!LocalizationManager.Instance.IsInitialized()) { if (!_isAddStringsCoroutineRunning) { StaticCoroutineRunner.StartStaticCoroutine(waitForLocalizationManagerThenAddAllStrings()); } _localizedStringsToAdd.Add(new Tuple <string, string>(ID, text)); return; } Dictionary <string, string> localizationDictionary = Accessor.GetPrivateField <LocalizationManager, Dictionary <string, string> >("_translatedStringsDictionary", LocalizationManager.Instance); if (!localizationDictionary.ContainsKey(ID)) { localizationDictionary.Add(ID, text); } }
public static void AdminCommand(string Message, Action <string> callback) { StaticCoroutineRunner.StartStaticCoroutine(_adminCommand(Message, callback)); }
public static void DownloadMod(string id, Action <string> callback) { StaticCoroutineRunner.StartStaticCoroutine(_downloadMod(id, callback)); }
public static void SignInFromGame(string username, string password, string playfabID, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_signInFromGame(username, password, playfabID, callback)); }
public static void GetModBotLauncherDownload(Action <string> callback) { StaticCoroutineRunner.StartStaticCoroutine(_getModBotLauncherDownload(callback)); }
public static void GetTag(string tagID, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_getTag(tagID, callback)); }
public static void GetMyAuth(Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_getMyAuth(callback)); }
public static void Ping(Action <string> callback) { StaticCoroutineRunner.StartStaticCoroutine(_ping(callback)); }
public static void GetPlayerPrefix(string playfabID, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_getPlayerPrefix(playfabID, callback)); }
public static void DownloadTempFile(string key, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_downloadTempFile(key, callback)); }
public static void TransportTo(Transform item, Vector3 startPosition, Quaternion startRotation, Vector3 endPosition, Quaternion endRotation, float time, Action onComplete = null) { StaticCoroutineRunner.StartStaticCoroutine(transportTo(item, startPosition, startRotation, endPosition, endRotation, time, onComplete)); }
public static void HasLiked(string modId, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_hasLiked(modId, callback)); }
public static void DeleteComment(string targetModId, string targetCommentId, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_deleteComment(targetModId, targetCommentId, callback)); }
public static void Search(Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_search(callback)); }
public static void LikeComment(string modId, string commentId, string likeState, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_likeComment(modId, commentId, likeState, callback)); }
public static void GetAllModIds(Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_getAllModIds(callback)); }
public static void FavoriteMod(string modID, string favorite, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_favoriteMod(modID, favorite, callback)); }
public static void GetCurrentUser(Action <string> callback) { StaticCoroutineRunner.StartStaticCoroutine(_getCurrentUser(callback)); }
public static void Console(Action <string> callback) { StaticCoroutineRunner.StartStaticCoroutine(_console(callback)); }
public static void GetModTemplate(string modName, string description, string tags, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_getModTemplate(modName, description, tags, callback)); }
public static void UpdateUserData(string password, string username, string bio, string newPassword, string borderStyle, string showFull, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_updateUserData(password, username, bio, newPassword, borderStyle, showFull, callback)); }
public static void GetModData(string id, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_getModData(id, callback)); }
public static void OpenConsoleWebSocket(Action <string> callback) { StaticCoroutineRunner.StartStaticCoroutine(_openConsoleWebSocket(callback)); }
public static void Test(Action <string> callback) { StaticCoroutineRunner.StartStaticCoroutine(_test(callback)); }
public static void CreateAccount(string username, string password, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_createAccount(username, password, callback)); }
public static void SetPlayerTags(string tags, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_setPlayerTags(tags, callback)); }
public static void PostComment(string targetModId, string commentBody, Action <JsonObject> callback) { StaticCoroutineRunner.StartStaticCoroutine(_postComment(targetModId, commentBody, callback)); }