protected void Callback_GoldTotal(Action OnComplete) { float bonus = (_playerManager.accountType == 1)? _safePlayerPrefs.GetInt_PlayerGold() * 0.5f : 0; Debug.Log("_safePlayerPrefs.GetInt_PlayerGold() " + _safePlayerPrefs.GetInt_PlayerGold() + " " + bonus); _uiAnimatorManager.ShowTextFieldUpdateAniamtion( _textGoldTotal, 0, (int)(_safePlayerPrefs.GetInt_PlayerGold() + bonus), () => { if (earnedGoldWithMult != 0) { StartCoroutine(Wait(0.2f, () => { Callback_GoldTotalMulti(earnedGoldWithMult, OnComplete); })); } else { IsFiilGold = false; OnComplete(); } } ); }
private void CalculateEarnedGold(int bonusGold) { _safePlayerPrefs.AddEarnedGold( _safePlayerPrefs.GetInt_PlayerGold() + bonusGold); }