public void RenderWithLevelObject(Level levelObject) { // thisTransform.parent.gameObject.SetActive(true); level = levelObject; levelName.SetValue(levelObject.name); authorName.SetValue(levelObject.authorName); levelId.SetValue(levelObject.id); if (level.authorId != FirebaseAuthManager.Instance.User.UserId) { return; } levelIsAuthoredByUserEvent.Call(); }
private void OnLocalAuthChanged(FirebaseAuthManager.AuthStatus authStatus) { authStatusMessageBinding.SetValue(AuthStatusToMessage(authStatus)); switch (authStatus) { case FirebaseAuthManager.AuthStatus.LoginSuccessful: _redirectDelayTimer.Start(); break; case FirebaseAuthManager.AuthStatus.SignedOut: clearFormsBinding.Call(); break; } }
public override void YesPressed() { if (LevelIdToDeleteContainer.Instance.level.authorId != FirebaseAuthManager.Instance.User.UserId) { try { File.Delete($"{FilePaths.LevelsPath}/{LevelIdToDeleteContainer.Instance.level.id}.json"); } catch (Exception e) { Debug.LogException(e); throw; } } notificationBinding.SetValue($"LEVEL {LevelIdToDeleteContainer.Instance.level.name} DELETED SUCCESSFULLY"); MainMenuRouter.Instance.SetState(MainMenuRouter.MainMenuRoute.LocalLevelExplorer); }
private void OnAuthStateChanged(object sender, EventArgs eventArgs) { if (_auth.CurrentUser == User) { return; } bool signedIn = User != _auth.CurrentUser && _auth.CurrentUser != null; if (!signedIn && User != null) { Debug.Log($"Signed out {User.UserId}"); MainMenuRouter.Instance.OnUserSignedOut(); } User = _auth.CurrentUser; reactiveUser.SetValue(User); if (!signedIn) { return; } Debug.Log($"Signed in {User.UserId}"); MainMenuRouter.Instance.OnUserLoggedIn(); }
public void OnAuthMessageChanged(string newValue) => authStatusMessage.SetValue(newValue);
public void OnLevelIdChanged(string newValue) => levelIdBinding.SetValue(newValue);
public void OnAuthorNameChanged(string newValue) => authorNameBinding.SetValue($"BY {newValue}");
public void OnLevelIdChanged(string newLevelId) { levelIdBinding.SetValue(newLevelId); }
public void NotifyByToast(string message) { notificationBinding.SetValue(message); }
public void SetLocalLeaderState(LocalLeaderData leaderData) { positionBinding.SetValue(leaderData.position); playerDisplayNameBinding.SetValue(leaderData.playerDisplayName); scoreBinding.SetValue(leaderData.score); }
private void Start() { score.SetValue(SessionViewModel.Instance.score); }
public void OnSaveButtonPressed() { saveBinding.SetValue(_levelName); LevelEditorRouter.Instance.SetState(LevelEditorRoute.Editor); }
public void OnNameChanged(string newName) { nameBinding.SetValue(newName); }
public void Set(string value) { textBinding.SetValue(value); }
public void OnEmailChanged(string email) => emailBinding.SetValue(email);
public void SetState(TPageType newState) { OnStateExit(); state.SetValue(newState); OnStateEntered(newState); }
public void OnPasswordChanged(string password) => passwordBinding.SetValue(password);
public void OnToggleUI() { isUIActiveBinding.SetValue(!isUIActiveBinding.GetValue()); }
public void OnUploadButtonPressed() { LevelEditorViewModel.UploadLevelToFirestore(level); notificationBinding.SetValue($"LEVEL {level.name} UPLOADED SUCCESSFULLY"); }
public void OnBrushSelected(BrushType brushType) { selectedBrushBinding.SetValue(brushType); }
private void Start() { isMobile.SetValue(Application.isMobilePlatform); }
private void UpdateScoreLabel() { scoreBinding.SetValue($"Score: \n {score}"); }
private void OnRightClicked(InputAction.CallbackContext context) { rightClickBinding.SetValue(true); }
private void UpdateLivesLabel() { livesBinding.SetValue($"Lives: {lives}"); // _scoreLabel.text = $"Score: {_score}"; }
public void OnLevelNameChanged(string newValue) => levelNameBinding.SetValue(newValue);
public void OnLevelIdChanged(string newValue) => levelIdBinding.SetValue($"LEVEL ID: {newValue}");