| 
 
| 赞 | 0 |  
| VIP | 1 |  
| 好人卡 | 28 |  
| 积分 | 2 |  
| 经验 | 9126 |  
| 最后登录 | 2023-2-13 |  
| 在线时间 | 191 小时 |  
 Lv1.梦旅人 
	梦石0 星屑236 在线时间191 小时注册时间2010-6-22帖子233 | 
| 
本帖最后由 仙芋 于 2010-8-30 12:08 编辑
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  
 比如下面的.
 如何做到先显示 win_1.png
 过了数秒后
 显示 win_2.png?
 我用了  "20.times{Graphics.update}" 也没效果~
 复制代码 def refresh
    self.contents.clear
    self.contents.font.bold = true
    x = 4      
                  bitmap = Bitmap.new("Graphics/System/win_1.png") 
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(75, 86, bitmap,src_rect)
     20.times{Graphics.update}
                  bitmap = Bitmap.new("Graphics/System/win_2.png") 
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(75, 156, bitmap,src_rect)
     
    self.contents.font.size = 20
                self.contents.font.color = Color.new(132,48,0,255)
        cx = contents.text_size(@exp.to_s).width
        self.contents.draw_text(221, 97, cx, 32, @exp.to_s)
                self.contents.font.color = Color.new(132,48,0,255)
        cx = contents.text_size(@gold.to_s).width
        self.contents.draw_text(206, 159, cx, 32, @gold.to_s)
        
    self.contents.font.color = Color.new(250,130,0,255)
    cx = contents.text_size(@exp.to_s).width
    self.contents.draw_text(220, 96, cx, 32, @exp.to_s)
    cx = contents.text_size(@gold.to_s).width
    self.contents.draw_text(205, 158, cx, 32, @gold.to_s)
    y = 160
    x = 0
    @a = 0
    
    if @treasures.size < 3
      self.contents.font.size = 19
      for item in @treasures
        x = (@a % 3) * 100
        y = 160+(@a / 3) * 20 
        self.contents.font.color = Color.new(132,48,0,255)
        draw_item_name1(item, x+90, y+61)
            self.contents.font.color = Color.new(250,130,0,255)
       draw_item_name1(item, x+89, y+60)
        @a += 1
      end
    else
      self.contents.font.size = 17
      for item in @treasures
        x = (@a % 3) * 110
        y = 160+(@a / 3) * 20 
        draw_item_name1(item, x, y)
        @a += 1
      end
    end
  end
  def dispose
    super
    @back.dispose
  end
end
 | 
 |