/* * private void ShowLevelProgress() * { * float xpPlayer = GetXpNeeded(); * * //Debug.Log("xpPlayer" + xpPlayer +" "+ _playerManager.xp); * XPSlider.fillAmount = 1 + (xpPlayer / 1000); * } */ /* * private float GetXpNeeded() * { * for (int i = 0; i < _playerManager.allLevelsXP.Count; i++) * { * if (_playerManager.xp < _playerManager.allLevelsXP[i].maxValue) * { * _playerManager.level = _playerManager.allLevelsXP[i].ID; * * return (float)(_playerManager.xp - _playerManager.allLevelsXP[i].maxValue); * * } * } * #region DEBUG #if UNITY_EDITOR * Debug.Log("[ERROR] can't get xp needed! Level = " + _playerManager.level); #endif #endregion * * return _playerManager.xp; * } */ // private void CheckGoldChanged(Action OnComplete = null) { if (_goldCashed == _playerManager.gold) { return; } _uiAnimatorManager.ShowTextFieldUpdateAniamtion( gold, _goldCashed, _playerManager.gold, OnComplete); _goldCashed = _playerManager.gold; }
private void ShowGold() { Bonus.sprite = ImageRandom[1]; Bonus.gameObject.SetActive(true); _uiAnimatorManager.ShowTextFieldUpdateAniamtion(RandomText, (int)0, (int)CountBonus, () => { Core.Instance.StartCor(Wait(1f, () => { _uiAnimatorManager.ShowTextFieldUpdateAniamtion(RandomText, (int)CountBonus, (int)0); _uiAnimatorManager.ShowTextFieldUpdateAniamtion(_header.gold, (int)_playerManager.gold - CountBonus, _playerManager.gold, () => { Core.Instance.StartCor(Wait(1f, HideRandom)); }); })); }); }
protected void Callback_GoldForWinAttempts() { //Debug.Log("CALLBACK - Gold for win attempts !!!"); if (_goldForWinAttempts != 0) { _uiAnimatorManager.ShowTextFieldUpdateAniamtion( _textGoldForWinAttempts, 0, _goldForWinAttempts ); } }