private void FillingScoreDatas(float sleepTime) { _savedScore = GameDataStorage.GetSavedScore(_levelName); if (_savedScore == null) { _savedScore = new SavedScore(0, 0, 2); } AddScore(sleepTime); Show(); }
private void Start() { _levelName = GetComponent <LevelData>().LevelName; var savedScorre = GameDataStorage.GetSavedScore(); Score = savedScorre.Score; ScorePerSecond = savedScorre.ScorePerSecond; if (savedScorre.ScoreFactor >= _increaseTime) { _increaseTime = savedScorre.ScoreFactor; } _scorePerTime = new ScorrePerTime(10, Time.timeSinceLevelLoad, ScorePerSecond); ChangeScorre(0); }