public void Draw(SpriteBatch sb) { if (DrawUnder != null) { DrawUnder(this, sb); } Camera.drawGeneric(sb, MemSave.getr((int)position.X, (int)position.Y, size, size), c, null, 0, Vector2.Zero, SpriteEffects.None, 0); if (DrawOver != null) { DrawOver(this, sb); } }
public void CameraDraw(SpriteBatch sb, Vector2 v, float spacing, Color color) { if (lines.Count == 0) { return; } spacing *= (float)sf.MeasureString(lines[0]).Y; for (int i = 0; i < lines.Count; i++) { Camera.drawString(sb, sf, lines[i], Vector2.Add(v, MemSave.getv(0, (spacing * i))), color, 0, Vector2.Zero, SpriteEffects.None, 0); } }
/// <summary> /// Called after FINISH, draws all data to the backbuffer /// </summary> /// <param name="sb"></param> public static void RENDER(SpriteBatch sb) { sb.Draw(TOTAL, MemSave.getr(0, 0, TOTAL.Width, TOTAL.Height), Color.White); }
/// <summary> /// Get the full view of the camera /// </summary> /// <returns>Full view space, accounting for zoom</returns> public Rectangle getView() { return(MemSave.getr(CameraLocation.X, CameraLocation.Y, (int)Math.Round(ScreenLocation.Width / myZoom), (int)Math.Round(ScreenLocation.Height / myZoom))); }