コード例 #1
0
 public void Draw(MonoGameService editor)
 {
     if (!state.Globals.Get("draw").IsNil())
     {
         state.Call(state.Globals["draw"]);
     }
 }
コード例 #2
0
 public void Draw(MonoGameService editor)
 {
     if (currentState != null)
     {
         currentState.Draw(editor);
     }
 }
コード例 #3
0
        public override void OnLoad(MonoGameService Editor)
        {
            base.OnLoad(Editor);

            trajectory = new Trajectory(Name + "Trajectory", Position, "dot", 300, 100);
            trajectory.OnLoad(Editor);
        }
コード例 #4
0
        /// <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 });
        }
コード例 #5
0
        /// <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();
        }
コード例 #6
0
        public override void OnLoad(MonoGameService Editor)
        {
            base.OnLoad(Editor);

            radiusVector = new Vector2(texture.Width, texture.Height);
        }
コード例 #7
0
        public override void OnLoad(MonoGameService Editor)
        {
            base.OnLoad(Editor);

            font = Editor.Content.Load <SpriteFont>("Fonts/" + FontName);
        }