// Use this for initialization IEnumerator Start() { while (Application.isPlaying) { yield return(new WaitForSecondsRealtime(1)); Manager.Tick(); } }
// Use this for initialization IEnumerator Start() { Manager.LoadProgress(); while (Application.isPlaying) { yield return(new WaitForSecondsRealtime(1)); Manager.Tick(); Manager.SaveProgress(); PlayerPrefs.Save(); } }
public void TestGenerators() { _testClickable.Currency = _testCurrency; _testClickable.Amount = 1; ArrayUtility.Add(ref _testManager.Config.Currencies, _testCurrency); var building = ScriptableObject.CreateInstance <Building>(); building.YieldAmount = new CurrencyTuple() { Amount = 5, Currency = _testCurrency }; _testManager.State.EarnedBuildings[building] = 1; _testManager.OnEnable(); _testManager.Tick(); Assert.AreEqual(5, _testManager.State.CurrencyCurrentTotals[_testCurrency]); }