Exemplo n.º 1
0
    // Use this for initialization
    IEnumerator Start()
    {
        while (Application.isPlaying)
        {
            yield return(new WaitForSecondsRealtime(1));

            Manager.Tick();
        }
    }
Exemplo n.º 2
0
    // Use this for initialization
    IEnumerator Start()
    {
        Manager.LoadProgress();
        while (Application.isPlaying)
        {
            yield return(new WaitForSecondsRealtime(1));

            Manager.Tick();
            Manager.SaveProgress();
            PlayerPrefs.Save();
        }
    }
Exemplo n.º 3
0
        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]);
        }