Exemple #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);
        }
Exemple #2
0
 public void AddEnemy(ShooterGameObject e)
 {
     _total++;
     _enemies.Add(e);
 }
Exemple #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;
 }
Exemple #4
0
 public void KillEnemy(ShooterGameObject e)
 {
     _enemies.Remove(e);
 }
Exemple #5
0
 public void KillEnemy(ShooterGameObject e)
 {
     _enemies.Remove(e);
 }
Exemple #6
0
 public void AddEnemy(ShooterGameObject e)
 {
     _total++;
     _enemies.Add(e);
 }