コード例 #1
0
ファイル: Sprite.cs プロジェクト: Kato88/MonsterGame
        public override void Draw(SceneGraph sceneGraph)
        {
            using (var sb = new SpriteBatch(sceneGraph.GraphicsDevice))
            {
                sb.Begin();

                sb.Draw(Texture, new Rectangle(AbsolutePositionX, AbsolutePositionY, Width, Height), Color.White);

                sb.End();
            }
        }
コード例 #2
0
ファイル: EditorGame.cs プロジェクト: Kato88/MonsterGame
        public EditorGame(IntPtr drawingSurface)
            : base()
        {
            _deviceManager = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            _drawingSurface = drawingSurface;
            _deviceManager.PreparingDeviceSettings +=
                (sender, args) => args.GraphicsDeviceInformation.PresentationParameters.DeviceWindowHandle = _drawingSurface;

            System.Windows.Forms.Control.FromHandle((this.Window.Handle)).VisibleChanged += (sender, args) =>
            {
                if (System.Windows.Forms.Control.FromHandle((this.Window.Handle)).Visible == true)
                    System.Windows.Forms.Control.FromHandle((this.Window.Handle)).Visible = false;
            };

            SceneGraph = new SceneGraph(_deviceManager.GraphicsDevice);
        }
コード例 #3
0
ファイル: Entity.cs プロジェクト: Kato88/MonsterGame
 /// <summary>
 /// This method is called in the update process of the scene graph.
 /// </summary>
 /// <param name="sceneGraph">The scene graph.</param>
 /// <author>Roy "Kato" Carlitscheck (RC) </author>
 /// <copyright>ek-Dev</copyright>
 /// <creationDate>05.02.2012 15:10</creationDate>
 public abstract void Update(SceneGraph sceneGraph);
コード例 #4
0
ファイル: Entity.cs プロジェクト: Kato88/MonsterGame
 /// <summary>
 /// This method is called in the draw process of the scene graph
 /// </summary>
 /// <param name="sceneGraph">The scene graph.</param>
 /// <author>Roy "Kato" Carlitscheck (RC) </author>
 /// <copyright>ek-Dev</copyright>
 /// <creationDate>05.02.2012 15:11</creationDate>
 public abstract void Draw(SceneGraph sceneGraph);
コード例 #5
0
ファイル: Camera.cs プロジェクト: Kato88/MonsterGame
 public void Update(SceneGraph sceneGraph)
 {
     //TODO: implement update
 }
コード例 #6
0
ファイル: Sprite.cs プロジェクト: Kato88/MonsterGame
 public override void Update(SceneGraph sceneGraph)
 {
     throw new System.NotImplementedException();
 }