Example #1
0
 public override void Update(GameTime gameTime, Rectangle clientBounds, Vector2 newPOS, LevelManager level)
 {
     timeSinceLastFrame += gameTime.ElapsedGameTime.Milliseconds;
     if (timeSinceLastFrame > millisecondsPerFrame)
     {
         timeSinceLastFrame -= millisecondsPerFrame;
         if (!level.CheckCollisions(newPOS, false))
             SetPosition = newPOS;
     }
     base.Update(gameTime, clientBounds);
 }
Example #2
0
 public void Update(GameTime gameTime, Vector2 newPOS, LevelManager level)
 {
     timeSinceLastFrame += gameTime.ElapsedGameTime.Milliseconds;
     if (timeSinceLastFrame > millisecondsPerFrame)
     {
         timeSinceLastFrame -= millisecondsPerFrame;
         if (!level.CheckCollisions(newPOS, false) && MobileWall.canMove)
             SetPosition = newPOS;
     }
     base.Update(gameTime);
 }