
把上面这个放到Pictures里,然后xx.draw_number(x,y,数字..)
类似伤害美化什么的都可以用这个做``~~效果如图 
class Bitmap def draw_number(x, y, nu,pict = RPG::Cache.picture("shuzi")) w=pict.width / 10 h=pict.height ce = Rect.new(0,0,w,h) nu=nu.to_s ar = nu.split(//) for i in 0...ar.size ar[i] = ar[i].to_i end for sz in ar ce.x = sz * w self.blt(x,y,pict,ce) x+=w end end end | |