Skip to content

565E0E0A

Marcel Härtel edited this page Aug 19, 2023 · 1 revision

EditorService Methods

Methods

AddDefaultComponents Add all default (integrated) GameComponent's to the GameComponentCollection. These are basically a ICamera2D and a FPSCounter components.

Remarks

If you want to add your own ones, call Components.Add(); from your custom MonoGame.Forms.Control.

BeginAntialising Everything between BeginAntialising() and EndAntialising() will be affected by MSAA.
BeginCamera2D Use 'BeginCamera2D' as a replacement of SpriteBatch.Begin(SpriteSortMode, BlendState, SamplerState, DepthStencilState, RasterizerState, Effect, Matrix?).

Remarks

Automatically uses the Matrix of the Camera2D component!

BeginRenderTarget Everything between BeginRenderTarget() and EndRenderTarget() will be drawn to the RenderTarget2D.
CamMove Move the camera by the value defined in the parameter amount.
CamRotate Rotate the camera component.
CamZoom Zoom the camera component.
DisableRenderTargets Disable all custom RenderTarget2D's hold by the EditorService.RenderTargetManager, before they becoming reactivated after 500 milliseconds.
Dispose Disposes the contents of this service.
EndAntialising Everything between BeginAntialising() and EndAntialising() will be affected by MSAA.
EndCamera2D Use this to end the SpriteBatch, previously opened by BeginCamera2D(SpriteSortMode, BlendState, SamplerState, DepthStencilState, RasterizerState, Effect).
EndRenderTarget Everything between BeginRenderTarget() and EndRenderTarget() will be drawn to the RenderTarget2D.
GetCamRotation Get the current camera rotation.
GetCamZoom Get the current camera zoom.
RemoveAllComponents Remove all GameComponent from the GameComponentCollection. This also counts for your own ones!

Remarks

If you only want to remove your own ones, call Components.Remove(); from your custom MonoGame.Forms.Control.

RemoveDefaultComponents Remove all default (integrated) GameComponent's from the GameComponentCollection. These are basically a ICamera2D and a FPSCounter components.

Remarks

If you want to add your own ones, call Components.Add(); from your custom MonoGame.Forms.Control.

ResetCam Resets all or specific values from the camera component to their defaults.
ResourceContentManagerInitialize Initializes a custom ResourceContentManager.

See Also

Reference

EditorService Class
MonoGame.Forms.NET.Services Namespace

Clone this wiki locally