public override void Init(PrototypingFramework.engine.GameEngine game) { base.Init(game); Texture tex = new Texture("content/greenTile.png"); c = new GraphicComponent[count]; Vector2f mid=new Vector2f(_game.Window.Size.X/2,_game.Window.Size.Y/2); for (int i = 0; i < count-1; i++) { c[i] = new GraphicComponent("content/greenTile.png",tex); c[i].Move(mid); c[i].Scale(new Vector2f(32,32)); } c[count - 1] = new GraphicComponent("content/object.png",new Texture("content/object.png")); c[count - 1].Move(mid); c[count - 1].Scale(new Vector2f(32, 32)); }
/// <summary> /// Queue the graphic component to draw it when SpriteBatch.End is called /// </summary> /// <param name="value">Graphic object we want to draw</param> public static void Draw(GraphicComponent value) { //just add the object to the list _drawList.Add(value.BatchInfo); }