// === === === === === === === === === === public void DrawBackground() { new DrawCall( engine.GetTexture("blank"), new fbRectangle( GetScreenPosition() + TopLeftMargin, GetSizeInternal() ), Depth + 1, GetBackgroundColor() ).Draw(engine); }
protected override void Initialize() { base.Initialize(); SpriteBatch = new SpriteBatch(GraphicsDevice); Engine = new fbEngine(this); Engine.SetSize(1280, 720); LoadTexturesFromFile("cfg/textures.cfg"); Engine.DefaultFont = new Font(); Engine.DefaultFont.FontSheet = Engine.GetTexture("font"); Engine.DefaultFont.CharSize = new Vector2(8); NetMessage3.Setup(); Game = new fbGame(); Game.Ready = false; Game.SetupClientSideEventHandler(Engine); //eugh fbNetClient.Game = Game; UI = new fbInterface(Game, Engine); Engine.StartNetClient(); }
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 ); }