非常感谢
但是用这个脚本显示小数点的话会变成0,这个应该怎么改?
我的数字图片里有"."这个字符,写了if判断还是不行啊……(我肯定有哪里写错了……)
[pre lang="ruby" line="1"]class Bitmap
def draw_number(x, y, nu,pict = RPG::Cache.picture("bonus"))
w=pict.width / 12
h=pict.height
ce = Rect.new(0,0,w,h)
nu=nu.to_s
ar = nu.split(//)
for i in 0...ar.size
ar = ar.to_i
end
for sz in ar
if sz == "."
ce.x = 11 * w
else
ce.x = sz * w
end
self.blt(x,y,pict,ce)
x+=w
end
end
end[/pre]