public void UnloadContent() { // Don't unload the current picture set, the completed screen may use it if (nextPictureSet != null) { nextPictureSet.Unload(); } }
public void Update(GameTime gameTime) { this.camera.Update(gameTime); this.lighting.Update(gameTime, camera); // When there is a "next picture set" animate a cross fade to it if (nextPictureSet != null) { textureRotationTime += (float)gameTime.ElapsedRealTime.TotalSeconds; if (textureRotationTime >= textureRotationDuration) { // The current textures are no longer needed if (currentPictureSet != null) { currentPictureSet.Unload(); } // because the next texture set are now current currentPictureSet = nextPictureSet; nextPictureSet = null; textureRotationTime = 0.0f; } } if (IsShifting) { // Animate shift time currentShiftTime += (float)gameTime.ElapsedGameTime.TotalSeconds; if (currentShiftTime > ShiftDuration) { // Stop shifting shiftingChips.Clear(); shiftX = 0; shiftY = 0; } } // Update all chips foreach (Chip chip in chips) { chip.Update(gameTime); } }
public override void UnloadContent() { pictureSet.Unload(); base.UnloadContent(); }