protected void ShowStars(IGameWindow gameWindow, Action OnComplete) { int triesCount = gameWindow.Get_TriesCount(); if (triesCount >= 3) { triesCount = 3; } if (_raceResult == RaceResultEnum.WIN) { StartCoroutine(Wait(0.5f, () => { ShowAnimStar(triesCount, 0, OnComplete); })); } else { OnComplete(); } }
protected void ShowWinAttemptsX(IGameWindow gameWindow) { if (_raceResult != RaceResultEnum.WIN && _safePlayerPrefs.GetInt_EarnedGold() > 0) { _textLabelWinAttempts.text = string.Format("{0}:", _defaultWinAttemptsLabel); _TitleExpForWin.text = string.Format("{0}:", "stars"); return; } int triesCount = gameWindow.Get_TriesCount(); string multiplier = ""; switch (triesCount) { case 3: multiplier = "X1"; break; case 2: multiplier = "X2"; break; case 1: multiplier = "X3"; break; default: #region DEBUG #if UNITY_EDITOR Debug.Log("[ERROR] triesCount (must be 1 or 2 or 3), but it is = " + triesCount); #endif #endregion break; } _textLabelWinAttempts.text = string.Format("{0} {1}:", _defaultWinAttemptsLabel, multiplier); _TitleExpForWin.text = string.Format("{0} {1}:", "stars", multiplier); }
public int XPForStars(IGameWindow gameWindow) { int triesCount = gameWindow.Get_TriesCount(); if (triesCount == 3) { return(400); } else if (triesCount == 2) { return(200); } else if (triesCount == 1) { return(100); } else { return(0); } }