예제 #1
0
        public override void Update(GameTime gameTime)
        {
            float t = (float)gameTime.ElapsedGameTime.TotalSeconds;

            SetAccelerations(t);
            if (linearThrust != 0)
            {
                AddSmoke(t);
            }
            PickupItems();
            base.Update(gameTime);
            if (lockOnSprite != null &&
                (lockOnSprite.position - position).Length() >= lockOnRange
                ||
                (!LimitsEdgeGame.worldStateManager.crateManager.crates.Contains(lockOnSprite) &&
                 !LimitsEdgeGame.worldStateManager.asteroidManager.asteroids.Contains(lockOnSprite)))
            {
                lockOnSprite = null;
            }
        }
예제 #2
0
 public void RemoveLockOnSprite()
 {
     lockOnSprite = null;
 }
예제 #3
0
 public void SetLockOnSprite(MovingSprite sprite)
 {
     lockOnSprite = sprite;
 }