在单机游戏中进行调试
如何在Monogame中打印或输出文本?
How do you print or output text in Monogame?
我用谷歌搜索了如何在单人游戏中显示文字,并被引至: Debug.WriteLine
I googled how to display text in monogame and was led to this: Debug.WriteLine
Which says: "By default, the output is written to an instance of DefaultTraceListener."(and that page just confused me more).
因此,如果有人可以将我引导到一种显示DefaultTraceListener的方法,或者在单机游戏中输出文本的另一种方法,我将不胜感激.
So, if someone could direct me to a method of displaying DefaultTraceListener, or another method of outputting text in monogame, I would appreciate it.
我找到了!
使用Debug.WriteLine写入调试器,该调试器位于Visual Studio的输出窗口中(默认情况下位于底部).默认情况下,在OpenGL项目中关闭程序(按F5键启动,按Esc键关闭)时会出现.
Using Debug.WriteLine writes to the debugger, which is in the output window in Visual Studio(by default at the bottom). It appears when you close the program(press F5 to start, Esc to close) by default in an OpenGL project.