public void ExplosionKnockBack(List <Wizard> wizards, Fireball fireball) { foreach (var wizard in wizards) { InteractionManager.FireballExplosion(wizard, fireball.explosion); } }
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); }
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); } } }