| 
 
| 赞 | 0 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 1 |  
| 经验 | 1805 |  
| 最后登录 | 2015-11-21 |  
| 在线时间 | 34 小时 |  
 Lv1.梦旅人 
	梦石0 星屑50 在线时间34 小时注册时间2013-10-10帖子13 | 
3楼
 
 
 楼主|
发表于 2013-10-13 15:42:37
|
只看该作者 
| 我是个整体的窗口,就一个,在左侧 你这段脚本提示复制代码class Window_MapStatus < Window_Base
  #----------------------------------------------------------------------------
  # * 初始化
  #----------------------------------------------------------------------------
  def initialize
    super(0, 0, 271, 426)
    self.opacity = 255
    refresh
  end
出错,我把整个脚本给你看吧复制代码    ($game_party.members.size - 1) times do |i|
复制代码#==============================================================================
# ** Window_MapStatus
#==============================================================================
class Window_MapStatus < Window_Base
  #----------------------------------------------------------------------------
  # * 初始化
  #----------------------------------------------------------------------------
  def initialize
    super(0, 0, 271, 426)
    self.opacity = 0
    refresh
  end
  #----------------------------------------------------------------------------
  # * 刷新画面
  #----------------------------------------------------------------------------
  def update
    super
    refresh if $refresh
    $refresh = false
    if $game_player.screen_x >= 0 and $game_player.screen_x <= self.width and
       $game_player.screen_y >= 0 and $game_player.screen_y <= self.height
      self.contents_opacity = 60
    else self.contents_opacity = 255
    end
  end
  #----------------------------------------------------------------------------
  # * 更新内容
  #----------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.size = 22
    self.contents.font.bold = true
    draw_actor_name($game_party.members[0], 0, 0)
    self.contents.font.size = 18
    self.contents.font.color = Color.new(64, 224, 208) 
    self.contents.draw_text(60, 350, self.contents.width - 40, 24, $game_party.members[1].level)
    self.contents.draw_text(143, 350, self.contents.width - 40, 24, $game_party.members[2].level)
    self.contents.draw_text(226, 350, self.contents.width - 40, 24, $game_party.members[3].level)
    self.contents.font.color = Color.new(51, 161, 201)
    self.contents.draw_text(80, 0, 42, 24, "Lv.")
    self.contents.font.color = text_color(0)
    self.contents.draw_text(110, 0, self.contents.width - 40, 24, $game_party.members[0].level) 
    draw_actor_icons($game_party.members[0], 0, 86,264)
    draw_actor_icons($game_party.members[1], 0, 328,72)
    draw_actor_icons($game_party.members[2], 83, 328,72)
    draw_actor_icons($game_party.members[3], 166, 328,72)
    draw_actor_hp($game_party.members[0], 0, 20, self.contents.width - 110)
    draw_actor_mp($game_party.members[0], 0, 40, self.contents.width - 110)
    draw_actor_exp($game_party.members[0], 0, 60, self.contents.width - 110)
    self.contents.font.size = 14
    draw_actor_name($game_party.members[1], 0, 350)
    draw_actor_hp($game_party.members[1], 0, 363, self.contents.width - 167)
    draw_actor_mp($game_party.members[1], 0, 378, self.contents.width - 167)
    draw_actor_name($game_party.members[2], 83, 350)
    draw_actor_hp($game_party.members[2], 83, 363, self.contents.width - 167)
    draw_actor_mp($game_party.members[2], 83, 378, self.contents.width - 167)
    draw_actor_name($game_party.members[3], 166, 350)
    draw_actor_hp($game_party.members[3], 166, 363, self.contents.width - 167)
    draw_actor_mp($game_party.members[3], 166, 378, self.contents.width - 167)
    self.contents.font.bold = false
  end
  #----------------------------------------------------------------------------
  # * 描绘EXP槽
  #----------------------------------------------------------------------------
  def draw_actor_exp(actor, x, y, width=124)
    rate = actor.exp.to_f / actor.next_level_exp.to_f
    draw_gauge(x, y, width, rate, Color.new(0, 255, 0), Color.new(100, 255, 100))
    self.contents.font.color = text_color(16)
    self.contents.draw_text(x, y, 56, 24, "EXP")
    self.contents.font.color = Color.new(255, 255, 255)
    en = "#{actor.exp}/#{actor.next_level_exp}"
    self.contents.draw_text(x, y, width, 24, en, 2)
  end
  #----------------------------------------------------------------------------
  # * 描绘值槽
  #----------------------------------------------------------------------------
  def draw_gauge(x, y, width, rate, color1, color2)
    fill_w = (width * rate).to_i
    self.contents.gradient_fill_rect(x, y+12, fill_w, 6, color1, color2, true)
    self.contents.gradient_fill_rect(x, y+18, fill_w, 6, color2, color1, true)
    self.contents.fill_rect(x, y+12, width, 2, Color.new(94, 38, 18))
    self.contents.fill_rect(x, y+22, width, 2, Color.new(94, 38, 18))
    self.contents.fill_rect(x, y+14, 2, 8, Color.new(94, 38, 18))
    self.contents.fill_rect(x+width-2, y+14, 2, 8, Color.new(94, 38, 18))
  end
  #----------------------------------------------------------------------------
  # * 描绘名称
  #----------------------------------------------------------------------------
  def draw_actor_name(actor, x, y, width = 112)
    color = Color.new(252, 230, 201)
    color = crisis_color if actor.hp < actor.mhp / 
    color = knockout_color if actor.hp == 0
    change_color(color)
    draw_text(x, y, width, line_height, actor.name)
  end
end
 | 
 |