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); }
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); }