Game1.Update C# (CSharp) Method

Update() protected method

protected Update ( GameTime gameTime ) : void
gameTime GameTime
return void
        protected override void Update(GameTime gameTime)
        {
            // ... other stuff ...
            asteroidSpawnTimer += (float)gameTime.ElapsedGameTime.TotalSeconds;
            if(asteroidSpawnTimer >= asteroidSpawnDelay)
            {
                asteroidSpawnTimer -= asteroidSpawnDelay; // subtract "used" time
                CreateAsteroid();
            }
        }
    }

Same methods

Game1::Update ( GameTime gameTime )