public bool MoveToEnd(PlayerAnimations animation, GameTime gameTime) { if (location.X < GlobalVars.resolutionWidth) { animation.Moving(gameTime); location += new Vector2(GlobalVars.playerSpeed, 0); return false; } else { return true; } }
public void MoveLeft(PlayerAnimations animation, Level level, GameTime gameTime, Collision collision) { if (level.location > 0) { if (!collision.checkPlayerLevelCollision(animation, this, level).Contains("Left")) { animation.Moving(gameTime); if (!screenLocked) { level.MoveLevel(-1); } else { if (location.X > 0) { location -= new Vector2(GlobalVars.playerSpeed, 0); } } } } }