public override void Back() { GameData.Clear(); base.Back(); Popup_Leaderboard.SendScore(res => { }); #if DATABEEN DataBeen.SendEndLevelData("game", score.Current, false); #endif }
public void OnOkButton() { var value = inputName.text.CleanFromCode().CleanForPersian(); if (value.Length < 3 || BadWordsFinder.HasBadWord(value)) { inputName.text = gameManager.PlayerName; return; } okButton.SetInteractable(false); gameManager.PlayerName = value; Popup_Leaderboard.SendScore(res => { Back(); callbackFunc(); }); }
private void Start() { OpenState <State_Loading>(); if (PlayerName.Length < 3) { PlayerName = "player" + Random.Range(1000, 9999); Popup_Leaderboard.SendScore(p => { #if DATABEEN DelayCall(10, () => { Debug.Log("Registered player"); DataBeen.SendCustomEventData("Registered", new DataBeenConnection.CustomEventInfo[] { new DataBeenConnection.CustomEventInfo() { key = "id", value = p.id } }); }); #endif }); } BadWordsFinder.Initialize(badnames.text.Split(new char[] { '\n' }, System.StringSplitOptions.RemoveEmptyEntries)); }