Exemple #1
0
        public override void Update(GameTime gameTime)
        {
            if (IsPickedUp)
            {
                return;
            }

            Sprite.Update(gameTime);
            HoveringSprite.Update(gameTime);

            if (IsPlayerCollision(Sprite.Position.X, Sprite.Position.Y))
            {
                PickedUp();
            }

            HoveringSprite.Position = new Vector2(HoveringSprite.Position.X,
                                                  (float)(5.0 * Math.Sin(0.005 * gameTime.TotalGameTime.TotalMilliseconds) + SpawningLocation.Y - 20.0));

            base.Update(gameTime);
        }
Exemple #2
0
        public override void Update(GameTime gameTime)
        {
            Sprite.Update(gameTime);

            base.Update(gameTime);
        }