public static IRenderContainer AddRenderObject(this IRenderContainer renderContainer, object obj) { if (obj is IInitializer initializer) { renderContainer.AddInitializer(initializer); } if (obj is IUpdatable updater) { renderContainer.AddUpdater(updater); } if (obj is IRenderable renderer) { renderContainer.AddRenderer(renderer); } return(renderContainer); }
public ViewportRenderer(IRenderContainer container) { _container = container; }
public static IRenderContainer AddRenderer(this IRenderContainer renderContainer, Action callback) { renderContainer.AddRenderer(new CustomRenderer(callback)); return(renderContainer); }
public static IRenderContainer AddRenderer(this IRenderContainer renderContainer, IRenderable renderer) { renderContainer.Renderers.Add(renderer); return(renderContainer); }
public static IRenderContainer AddUpdater(this IRenderContainer renderContainer, IUpdatable updater) { renderContainer.Updaters.Add(updater); return(renderContainer); }
public static IRenderContainer AddInitializer(this IRenderContainer renderContainer, IInitializer initializer) { renderContainer.Initializers.Add(initializer); return(renderContainer); }
public HudRenderer(IRenderContainer container, Func <ITexture2DAtlas> fontTextureProvider, Font defaultFont) { _container = container; _fontTextureProvider = fontTextureProvider; _defaultFont = defaultFont; }