Пример #1
0
        public override void Tick()
        {
            if (tolleranceCtrl.IsActive() && !immunity)
            {
                tolleranceCtrl.AddTolleranceOvertime();
            }

            if (tolleranceCtrl.CheckTolerance())
            {
                if (tolleranceCtrl.OnMaxTolleranceBar != null)
                {
                    tolleranceCtrl.OnMaxTolleranceBar();
                }
            }
        }
Пример #2
0
    private IEnumerator Tick()
    {
        while (true)
        {
            if (toleranceCtrl.IsActive())
            {
                toleranceCtrl.AddTolleranceOvertime();

                if (toleranceCtrl.CheckTolerance())
                {
                    if (toleranceCtrl.OnMaxTolleranceBar != null)
                    {
                        toleranceCtrl.OnMaxTolleranceBar();
                    }
                }
            }

            yield return(null);
        }
    }