Example #1
0
        private float GetEnemySoundPos(ShooterGameObject e)
        {
            var x          = e.GetX();
            var w          = e.GetWidth();
            var halfwidth  = ((float)SystemMain.Width / 2);
            var finalfloat = 0.0f;

            x += ((float)w / 2);
            var zeropoint = SystemMain.Width / 2;

            if (x > ((float)w / 2))
            {
                x         -= halfwidth;
                finalfloat = (x / halfwidth);
            }
            else
            {
                finalfloat = (x / halfwidth);
                finalfloat = Math.Abs(1 - finalfloat) * (-1);
            }
            return(finalfloat);
        }
Example #2
0
 public void AddEnemy(ShooterGameObject e)
 {
     _total++;
     _enemies.Add(e);
 }
Example #3
0
 private float GetEnemySoundPos(ShooterGameObject e)
 {
     var x = e.GetX();
     var w = e.GetWidth();
     var halfwidth = ((float)SystemMain.Width/2);
     var finalfloat = 0.0f;
     x += ((float)w/2);
     var zeropoint = SystemMain.Width/2;
     if(x>((float)w/2))
     {
         x -= halfwidth;
         finalfloat = (x/halfwidth);
     }
     else
     {
         finalfloat = (x / halfwidth);
         finalfloat = Math.Abs(1 - finalfloat)*(-1);
     }
     return finalfloat;
 }
Example #4
0
 public void KillEnemy(ShooterGameObject e)
 {
     _enemies.Remove(e);
 }
Example #5
0
 public void KillEnemy(ShooterGameObject e)
 {
     _enemies.Remove(e);
 }
Example #6
0
 public void AddEnemy(ShooterGameObject e)
 {
     _total++;
     _enemies.Add(e);
 }