我在试着学习一些关于戈苏的基础知识。我可以显示图像,但是当我尝试使用文本时,应用程序就会崩溃。下面是我试图运行的一个简单代码。
<!-- language: rb -->
require 'gosu'
class GameWindow < Gosu::Window
def initialize(width=320, height=240, fullscreen=false)
super
self.caption = 'Hello'
@message = Gosu::Image.from_text(self, "My text to print",Gosu.default_font_name,100)
end
def draw
@message.draw(10, 10, 0)
end
end
window = GameWindow.new
window.show我的系统:
-Windows xp sp3
-ruby 1.93 448
-gosu 0.10.4
### cmd报表映像
### cmd报告2图像
发布于 2016-03-04 14:52:28
对于在xp上有此问题的每个人,只需安装一个先前版本的gosu,0.9.2很好用。
使用: gem安装gosu -v"0.9.2“
发布于 2015-11-14 18:54:00
对我来说很好
天呐0.10.4
ruby 2.1.2p95 (2014-05-08) x86_64-linux-gnu
在ubuntu上运行

https://stackoverflow.com/questions/33711728
复制相似问题