Beispiel #1
0
        // Call every game cycle
        public void Tick()
        {
            finder.Update();
            actors = new List<IActor>( finder.GetActors().Values) ;
            currentForce = GetCurrentForce(actors);
            if (currentForce == 0)
            {
                return;
            }
            else
            {

                if (currentForce > 0)
                {
                    tower.ApplyDamage(currentForce);
                }
                // If heal is Enabled
                else
                {
                    tower.Heal(-currentForce);
                }
                if (tower.isDead)
                {
                    StopGame();
                }
            }
        }