Project1

标题: 求把此脚本背景改为图片 [打印本页]

作者: 个快快    时间: 2011-5-6 12:22
标题: 求把此脚本背景改为图片
  1. module Graphics
  2. @@ori = method("transition")
  3. def self.transition(*args)
  4.     StartNowLondingTr.stop
  5.     @@ori.call(*args)
  6. end  
  7. end  

  8. module StartNowLondingTr
  9. def self.start
  10.    @start = Thread.new do
  11.      @nowLsprite = Sprite.new
  12.      @nowLbitmap = Bitmap.new(640,480)
  13.      @nowLsprite.bitmap = @nowLbitmap
  14.      @nowLsprite.bitmap.fill_rect(0,0,640,480,Color.new(0,0,0,255))
  15.      @nowLsprite.x = 0
  16.      @nowLsprite.y = 0
  17.      @nowLsprite.z = 99999999
  18.      @nowLsprite.visible = true
  19.      @nowLsprite.bitmap.draw_text(400,420,200,60,"载入中")
  20.      loop do
  21.        sleep 0.001
  22.        Graphics.update
  23.      end
  24.    end
  25. end
  26. def self.stop
  27.    @start.exit
  28.    @nowLsprite.dispose
  29.    @nowLsprite.bitmap.dispose
  30. end
  31. end

  32. class Class
  33. alias ori_new new
  34. def new(*args)
  35.    if self.method_defined? :main
  36.      StartNowLondingTr.start
  37.      @obj =  ori_new(*args)
  38.      return @obj
  39.    else
  40.      return ori_new(*args)
  41.    end
  42. end
  43. end
复制代码
应该是很简单的问题,把color删掉,加入图片,可偶就不会:lol dsu_plus_rewardpost_czw
作者: fux2    时间: 2011-5-6 12:51
  1. module Graphics
  2. @@ori = method("transition")
  3. def self.transition(*args)
  4.     StartNowLondingTr.stop
  5.     @@ori.call(*args)
  6. end  
  7. end  

  8. module StartNowLondingTr
  9. def self.start
  10.    @start = Thread.new do
  11.      @nowLsprite = Sprite.new
  12.      @nowLbitmap = Bitmap.new("Graph.....地址")
  13.      @nowLsprite.bitmap = @nowLbitmap
  14.      @nowLsprite.x = 0
  15.      @nowLsprite.y = 0
  16.      @nowLsprite.z = 99999999
  17.      @nowLsprite.visible = true
  18.      @nowLsprite.bitmap.draw_text(400,420,200,60,"载入中")
  19.      loop do
  20.        sleep 0.001
  21.        Graphics.update
  22.      end
  23.    end
  24. end
  25. def self.stop
  26.    @start.exit
  27.    @nowLsprite.dispose
  28.    @nowLsprite.bitmap.dispose
  29. end
  30. end

  31. class Class
  32. alias ori_new new
  33. def new(*args)
  34.    if self.method_defined? :main
  35.      StartNowLondingTr.start
  36.      @obj =  ori_new(*args)
  37.      return @obj
  38.    else
  39.      return ori_new(*args)
  40.    end
  41. end
  42. end
复制代码





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1