public void ShareScreenShot() { AnalyticsService.LogEvent("Shared_Screenshot"); SetLayoutForScreenShot(); //Stop coroutine StopCoroutine("ScoreCountDownCoroutine"); //Set finalScore for screenshot gameOverScoreText.text = this.finalScore.ToString(); string screenShotPath = Application.persistentDataPath + "/" + gameOverImage; ////Capture screenshot //Application.CaptureScreenshot(gameOverImage); ResetLayoutAfterScreenShot(); if (Application.platform == RuntimePlatform.Android) { OpenAndroidIntent(screenShotPath, LanguageService.GetLanguageDictionary().shareMsg); } }
public void SetGameOver(int roundScore) { AnalyticsService.LogEvent("Game_Over_Score", "Score", roundScore); enemySpanwer.SetActive(false); SaveGameTimeExperience(); dashBtn.gameObject.SetActive(false); dashSlider.gameObject.SetActive(false); enemySpanwer.SetActive(false); prizeSpawner.SetActive(false); btnUp.SetActive(false); btnDown.SetActive(false); btnLeft.SetActive(false); btnRight.SetActive(false); pauseButton.gameObject.SetActive(false); FindObjectOfType <BackgroundManager_new>().gameObject.SetActive(false); this.finalScore = roundScore; screenShotScore.text = roundScore.ToString(); matchFinalScoreValueText.text = roundScore.ToString(); //Save in case of highScore HighScoreService.SaveNewScore(roundScore); //Load highest score bestHighScoreValueText.text = HighScoreService.GetHighestScore().ToString(); StartCoroutine(ShowGameOverPanel(roundScore)); }
public void Quit() { AnalyticsService.LogEvent("Has_Quit_Game"); PlaySelectAudio(); Application.Quit(); }
private void Start() { AnalyticsService.LogEvent("Started_New_Game"); if (RatingRequestService.ratingRequestDisabled) { var ratingRequestService = new RatingRequestService(); ratingRequestService.IncreaseTimesUserHasPlayed(); } LoadTextsLanguage(); }
public static int SetInitialDifficult(float timeThreshold) { var timeExperience = PlayerTimeExperienceDataService.LoadTimeExperience(); float averageTime = 0; if (timeExperience != null) { averageTime = timeExperience.GetAverageGameTime(); } AnalyticsService.LogEvent("Average_Time", "Average_Time", averageTime); //Expert II if (averageTime > timeThreshold * 15) { return(30); } //Expert if (averageTime > timeThreshold * 10) { return(20); } //Hard if (averageTime > timeThreshold * 7) { return(10); } //Normal if (averageTime > timeThreshold * 2) { return(5); } //Beginner return(2); }
public void ShowAd() { AnalyticsService.LogEvent("Clicked_Ad_Video"); StartCoroutine(ShowAdWhenReady()); }