예제 #1
0
 public void ExplosionKnockBack(List <Wizard> wizards, Fireball fireball)
 {
     foreach (var wizard in wizards)
     {
         InteractionManager.FireballExplosion(wizard, fireball.explosion);
     }
 }
예제 #2
0
        private void ThrowFireball()
        {
            foreach (var dormantFireball in _fireballs)
            {
                if (!dormantFireball.inMotion)
                {
                    dormantFireball.ThrowAgain(_fireballSpeed, _crosshair.crosshairAngle, position);
                    return;
                }
            }

            Fireball fireball = new Fireball(position, _fireballSpeed, _crosshair.crosshairAngle);

            fireball.LoadContent(_contentManager);
            _fireballs.Add(fireball);
        }
예제 #3
0
        public void CheckWizardCollisions(List <Wizard> wizards)
        {
            foreach (var wizard in wizards)
            {
                Fireball fireball = wizard.CheckFireballCollisions();
                if (fireball != null)
                {
                    _map.DeformLevel(fireball.explosion.explosionRadius, fireball.position);
                    ExplosionKnockBack(wizards, fireball);
                }

                if (wizard.activePlayer)
                {
                    CheckArrowHits(wizards, wizard);
                }
            }
        }