public void Draw(MonoGameService editor) { if (!state.Globals.Get("draw").IsNil()) { state.Call(state.Globals["draw"]); } }
public void Draw(MonoGameService editor) { if (currentState != null) { currentState.Draw(editor); } }
public override void OnLoad(MonoGameService Editor) { base.OnLoad(Editor); trajectory = new Trajectory(Name + "Trajectory", Position, "dot", 300, 100); trajectory.OnLoad(Editor); }
/// <summary> /// Called when an object in loaded into a simulation. /// </summary> /// <param name="Editor">MonoGameServiceEditor.</param> public virtual void OnLoad(MonoGameService Editor) { // Load and apply texture texture = LoadTexture(TextureName, Editor.Content); // Load border texture as blank white texture borderTexture = new Texture2D(Editor.graphics, 1, 1, false, SurfaceFormat.Color); borderTexture.SetData(new[] { Color.White }); }
/// <summary> /// Basic initializing. /// </summary> protected override void Initialize() { base.Initialize(); #if DX _Editor = new MonoGameService(_graphicsDeviceService, SwapChainRenderTarget); SwapChainRenderTargetRefreshed -= UpdateWindow_UpdateSwapChainRenderTarget; SwapChainRenderTargetRefreshed += UpdateWindow_UpdateSwapChainRenderTarget; MultiSampleCountRefreshed -= UpdateWindow_UpdateMultiSampleCount; MultiSampleCountRefreshed += UpdateWindow_UpdateMultiSampleCount; #elif GL _Editor = new MonoGameService(_graphicsDeviceService, SwapChainRenderTarget); #endif _Editor.Initialize(); }
public override void OnLoad(MonoGameService Editor) { base.OnLoad(Editor); radiusVector = new Vector2(texture.Width, texture.Height); }
public override void OnLoad(MonoGameService Editor) { base.OnLoad(Editor); font = Editor.Content.Load <SpriteFont>("Fonts/" + FontName); }