Project1

标题: 可以帮我改一下脚本的属性的显示量吗? [打印本页]

作者: Firaga    时间: 2010-12-19 17:55
标题: 可以帮我改一下脚本的属性的显示量吗?
本帖最后由 Firaga 于 2010-12-19 20:03 编辑

  #-------------------------------------------------------------------------
  # 属性
  #-------------------------------------------------------------------------
  def draw_enemy_element_ranks(id)
    self.contents.font.color = Color.new(255,180,255,255)
    self.contents.draw_text(380,0,60,24,"属性")
    self.contents.font.color = normal_color
    x = 0
    for i in @element
      self.contents.draw_text(380,x*48+24,80,24,$data_system.elements)
      case $data_enemies[id].element_ranks
      when 1
        percent = "200%"
        width = 100
        c1 = Color.new(255,255,64,255)
        c2 = Color.new(255,128,128,255)
      when 2
        percent = "150%"
        width = 75
        c1 = Color.new(255,255,64,255)
        c2 = Color.new(255,128,128,255)
      when 3
        percent = "100%"
        width = 50
        c1 = Color.new(255,255,64,255)
        c2 = Color.new(128,255,128,255)
      when 4
        percent = "50%"
        width = 25
        c1 = Color.new(255,128,128,255)
        c2 = Color.new(255,255,64,255)
      when 5
        percent = "0%"
        width = 0
        c1 = Color.new(255,128,128,255)
        c2 = Color.new(255,255,64,255)
      when 6
        percent = "-100%"
        width = 100
        c1 = Color.new(255,128,255,255)
        c2 = Color.new(128,255,128,255)
      end
      a = 380
      b = 6
      for i in 0...12
        self.contents.fill_rect(a,x*48+48+b,100,1,Color.new(0,0,0,200))
        a += 0.5
        b += 1
      end
      self.contents.gradient_fill_rect(380,x*48+48+6,width,1,c1,c2)
      self.contents.gradient_fill_rect(380.5,x*48+48+7,width,1,c1,c2)
      self.contents.gradient_fill_rect(381,x*48+48+8,width,1,c1,c2)
      self.contents.gradient_fill_rect(381.5,x*48+48+9,width,1,c1,c2)
      self.contents.gradient_fill_rect(382,x*48+48+10,width,1,c1,c2)
      self.contents.gradient_fill_rect(382.5,x*48+48+11,width,1,c1,c2)
      self.contents.gradient_fill_rect(383,x*48+48+12,width,1,c1,c2)
      self.contents.gradient_fill_rect(383.5,x*48+48+13,width,1,c1,c2)
      self.contents.gradient_fill_rect(384,x*48+48+14,width,1,c1,c2)
      self.contents.gradient_fill_rect(384.5,x*48+48+15,width,1,c1,c2)
      self.contents.gradient_fill_rect(385,x*48+48+16,width,1,c1,c2)
      self.contents.gradient_fill_rect(385.5,x*48+48+17,width,1,c1,c2)
      self.contents.draw_text(380,x*48+40,100,24,percent,2)
      x += 1
      break if x >= 6
    end
  end



请帮我将属性的显示量变为8个。谢谢

作者: 小幽的马甲    时间: 2010-12-19 18:30
8个的话怎么在数据库里设定多余的两个= =
作者: Firaga    时间: 2010-12-19 20:03
是吗,我知道了~




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