Project_Starfighter.Ammo.UpdateEnemyAmmo C# (CSharp) Méthode

UpdateEnemyAmmo() public méthode

public UpdateEnemyAmmo ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void
        public void UpdateEnemyAmmo(GameTime gameTime)
        {
            if (ammoActive)
            {
                fElapsed += (float)gameTime.ElapsedGameTime.TotalSeconds;
                if (fElapsed > fUpdateInterval)
                {
                    fElapsed = 0f;
                    aLocation.X -= iSpeed;
                    // If the bullet has moved off of the screen,
                    // set it to inactive
                    if ((aLocation.X > 800f) || (aLocation.X < 1f))
                    {
                        ammoActive = false;
                    }
                }   //end If
            }   // end If
        }