public virtual void Draw(SpriteBatch spriteBatch) { var position = ManagerCamera.WorlToScreenPosition(Position); if (ManagerCamera.InScreenCheck(Position)) { var tileFrame = TileFrames[_animationIndex]; spriteBatch.Draw(_texture, new Rectangle((int)position.X, (int)position.Y, Width, Height), new Rectangle(tileFrame.TextureXPos * (Width + 1) + 1, tileFrame.TextureYPos * (Height + 1) + 1, Width, Height), Color.White); } }
public bool GetPosition(Vector2 position, out Vector2 newPosition) { newPosition = _managerCamera.WorlToScreenPosition(position); return(_managerCamera.InScreenCheck(position)); }