private void DrawBackground() { Vector2 position = -Engine.GetTextureSize("background") / 2f + Engine.GetSize() / 2f; position -= Camera.Camera.Position / 10f; Engine.Draw( Engine.GetTexture("background"), new fbRectangle(position, new Vector2(-1)), new Color(0.3f, 0.3f, 0.3f), 1000 ); }
public void Draw(fbEngine engine) { int col = 0; int row = 0; foreach (char c in Text) { if (c == '\n') { col = 0; row++; continue; } Vector2 fontSpot = new Vector2( c % 16, (c - (c % 16)) / 16f ) * (Font.CharSize + new Vector2(1)) + new Vector2(1); engine.Draw( new DrawCall( Font.FontSheet, new fbRectangle( Position + Font.CharSize * new Vector2(col++, row), Font.CharSize ), new fbRectangle(fontSpot, Font.CharSize), Depth, Coloring ) ); } }
public void Draw(fbEngine engine) { engine.Draw(this); }