且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

控件不会进入我的xna代码中的update()和Draw()方法。

更新时间:2023-12-06 13:34:10

我认为你有提出了一个好的有效问题。但无论如何,对于这种思维错误,我总是首先尝试阅读文档(如果我使用特定技术(API),则更多)。



请查看 http://msdn.microsoft.com/ en-us / library / microsoft.xna.framework.game.update.aspx [ ^ ]



另请阅读有关Initialize和Draw的信息 - 我认为这很好在那里解释 - 以及调用方法的顺序(或间隔)(简而言之:不要指望在初始化阶段调用更新的beeing)。
I think you have formulated a good and valid question. But anyway, for this kind of "mind bugs" I'd always try to read the docu first (even more if I use a specific technology (API)).

so have a look at http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.update.aspx[^]

Read also about Initialize and Draw - I think it's well explained there - and the sequence (or interval) the methods get called (in short: don't count on Updated beeing called during initialization phase).