public void TakeDamage(Projectile projectile)
 {
     if (!starwhalPowerActive)
     {
         if (projectile.GameColor != gameColor && !NarlyGame.lairdMode)
         {
             health -= projectileDamage;
             takingDamage = true;
             NarlyGame.rumble.damageRumbleTimer = 0.75f;
         }
         else if (projectile.GameColor == gameColor) //absorb shot as starwhal power
         {
             AbsorbHit();
             NarlyGame.rumble.absorbRumbleTimer = 0.15f;
         }
     }
     //Debug.WriteLine("Damage!");
 }
 public void AddEnemyProjectile(Projectile projectile)
 {
     enemyProjectilesToAdd.Add(projectile);
 }
 public void RemoveEnemyProjectile(Projectile projectile)
 {
     enemyProjectilesToRemove.Add(projectile);
 }
 public static Projectile CreateProjectile(Game game, GameColors color)
 {
     released = false;
     if (unusedProjectiles[(int)color] == null)
     {
         unusedProjectiles[(int)color] = new Queue<Projectile>();
     }
     else if (unusedProjectilesToRelease[(int)color] != null)
     {
         foreach (var projectile in unusedProjectilesToRelease[(int)color])
         {
             if (projectile.ToRelease)
             {
                 unusedProjectiles[(int)color].Enqueue(projectile);
             }
             else
             {
                 projectile.ToRelease = true;
             }
         }
         unusedProjectilesToRelease[(int)color] = (from projectile in unusedProjectilesToRelease[(int)color]
                                                       where !projectile.ToRelease
                                                       select projectile).ToList();
     }
     if (unusedProjectiles[(int)color].Count > 0)
     {
         var projectile = unusedProjectiles[(int)color].Dequeue();
         return projectile;
     }
     var p = new Projectile(game, color);
     p.Initialize();
     return p;
 }