public void update() { if (ShouldUpdate) { DestinationRectangle = Sprite.DestinationRectangle; Sprite.update(); Physics.UpdatePosition(); if (beingProduced) { CheckForEndOfBeingProduced(); } } }
public void update() { if (ShouldUpdate) { DestinationRectangle = Sprite.DestinationRectangle; Sprite.update(); if (beingProduced && productionTimer % 3 == 0) { Physics.UpdatePosition(); CheckForEndOfBeingProduced(); } else if (!beingProduced) { Physics.UpdatePosition(); } } }
public void Update(GameTime gameTime) { TimeSinceLastFrame += gameTime.ElapsedGameTime.Milliseconds; if (TimeSinceLastFrame > 1000) { TimeSinceLastFrame -= 1000; if (startTimer) { Time--; if (Time < 100 && !MusicManager.Instance.currentSong.Contains("hurry")) { MusicManager.Instance.SetBackgroundMusic(MusicManager.Instance. currentSong.Substring(0, MusicManager.Instance.currentSong. IndexOf('-')) + "-hurry"); } } } Coin.update(); Coins = Game.st.Coins; Score = Game.st.Score; World = Game.parser.GetLevel(); coinLocation = new Vector2(Game.MainCameraObject.DestinationRectangle.X + (32 * 3.7f), Game.MainCameraObject.DestinationRectangle.Y + (14)); }