コード例 #1
0
    private void OnSecondPassed(SecondPassed e)
    {
        currentXP += xpPerSecond;

        if (currentLevel < xpPerLevel.Length)
        {
            GameEventManager.Instance.TriggerAsyncEvent(new UpdateXPEvent(currentXP, xpPerLevel[currentLevel]));
        }

        CheckForLevelUp();
    }
コード例 #2
0
ファイル: TimeManager.cs プロジェクト: endovitsky/Farm
        private IEnumerator Stopwatch()
        {
            while (true)
            {
                yield return(new WaitForSeconds(1));

                _secondsPassedCount++;

                Debug.Log("Second is passed.");

                SecondPassed.Invoke(SecondsPassedCount);
            }
        }
コード例 #3
0
 private void NotifySecondObservers()
 {
     SecondPassed?.Invoke(totalSeconds);
 }