Beispiel #1
0
 private void ResetEarnedValues()
 {
     _gameData.IsFinishedReplay = 0;
     _gameWindow.DeActiveJewels();
     _safePlayerPrefs.SaveEarnedJewels(0);
     _safePlayerPrefs.SaveEarnedGold(0);
     _safePlayerPrefs.SaveEarnedExp(0);
     _safePlayerPrefs.SavePlayerGold(0);
     _safePlayerPrefs.SaveTrickHorseTime(0f);
     _safePlayerPrefs.SaveTrickFlipSum(0);
     _safePlayerPrefs.SaveTrickAirTime(0f);
     _safePlayerPrefs.SaveTrick90Time(0);
     _safePlayerPrefs.SaveEarnedExpForTrick(0);
 }
Beispiel #2
0
        public void Start()
        {
            //new



            _uiManager.ShowWindow(UIWindowEnum.SPLASH, false);
            _gameWindow.Show();
            //
            _gameData.IsFinishedRecord = 0;

            _recordObjectController.Init();
            _gameWindow.DeActiveJewels();


            //InitTimeInfo();
            _gameWindow.DeActiveGold();



            if (!_playerManager.TrackOpen.Contains(Convert.ToInt32(_gameData.track_id) + 1))
            {
                //coroutineStartTimeInfo = Core.Instance.StartCor(СheckTimeInfo());
            }

            Debug.Log("Tryes in Start " + _gameData.GetTryes);
            _coroutineStartTimer = Core.Instance.StartCor(
                StartTimer(
                    _gameWindow,

                    () => {
                if (_gameData.GetTryes <= 0)
                {
                    //_finishWindow.OnBuyTriesClick += BuyTries;

                    _playerCar.EnablePlayerControll(false);
                    CalculateResults();
                    if (_coroutineStartTimer != null)
                    {
                        Core.Instance.StopCor(_coroutineStartTimer);
                    }
                }

                _coroutineRecord = Core.Instance.StartCor(Record());
                if (_replayData.Count > 0)
                {
                    _coroutineGhost = Core.Instance.StartCor(MoveGhost());
                }
                EventManager._init.Game.TrackEvent.GetEvent.Invoke_Start();
            }
                    )
                );
        }