设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索

(转生次数)这几个字重叠在一起了每个角色上多有的

查看数: 1523 | 评论数: 7 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2016-2-5 17:13

正文摘要:

RUBY 代码复制#==============================================================================# ★ 【角色转生系统】★#------------------------------------------------------------ ...

回复

金芒芒 发表于 2016-2-6 09:06:44
夜狠简单 发表于 2016-2-6 00:00
脚本好多

X-CH就出来3Q温州小美女,有空来藤桥玩
金芒芒 发表于 2016-2-6 08:14:01
本帖最后由 金芒芒 于 2016-2-6 08:17 编辑
夜狠简单 发表于 2016-2-6 00:00
脚本好多


就是这个X不知道是加什么还是-什么我把它换成(i+1)*95+25也分不开,你说脚本多这些还是只有菜单篇,还有战斗篇还没开始呢
夜狠简单 发表于 2016-2-6 00:00:18

脚本好多

评分

参与人数 1梦石 +1 收起 理由
RyanBern + 1 认可答案

查看全部评分

金芒芒 发表于 2016-2-5 21:12:21
夜狠简单 发表于 2016-2-5 19:53
class Window_Base < Window
  def draw_actor_xdrs_lx(actor, x, y)
    self.contents.font.color = text ...
  1. class Window_MenuStatus < Window_Selectable
  2.   #--------------------------------------------------------------------------
  3.   # ● 初始化对像
  4.   #--------------------------------------------------------------------------
  5.     def initialize(actor_index = 0, equip_index = 0)#def initialize(index = 0)
  6.     super(0, 64, 1200, 480)
  7.     self.contents = Bitmap.new(width - 32, height - 32)
  8.     refresh
  9.    # self.active = index
  10.     self.index =  index
  11.    # equip_index =

  12.   end
  13.   #--------------------------------------------------------------------------
  14.   # ● 刷新
  15.   #--------------------------------------------------------------------------
  16.     def refresh
  17.    
  18.     self.contents.clear
  19.    # @item_max = 4 #$game_party.actors.size
  20.   #  @item_may = 4
  21.   #  @column_max = 4
  22.   #  for i in 0...4   #$game_party.actors.size
  23.      
  24.    #   x = i * 116
  25.     #  y = 0
  26.       
  27.     @item_max = $game_party.actors.size
  28.     for i in 0...$game_party.actors.size
  29.     x = ( i + 1 ) * 92 +25
  30.     y = 44

  31.     @column_max = 4
  32.      

  33.     actor = $game_party.actors[i]
  34.     bitmap = Bitmap.new ("Graphics/Status/" + actor.id. to_s + "_h") #RPG::Cache.character(actor.character_name, actor.character_hue)
  35.     cw = bitmap.width
  36.     ch = bitmap.height
  37.     src_rect = Rect.new(0, 0, cw, ch)
  38.     self.contents.blt(x - ch , y - cw/ 2, bitmap, src_rect)
  39.      draw_actor_xdrs_lx(actor, 60, y)

  40.     #draw_actor_graphic(actor, x - 40, y + 80)
  41.      # draw_actor_name(actor, x, y)
  42. #      draw_actor_class(actor, x + 144, y)
  43. #      draw_actor_level(actor, x, y + 32)
  44. #     draw_actor_state(actor, x + 90, y + 32)
  45. #      draw_actor_exp(actor, x, y + 64)
  46. #      draw_actor_hp(actor, x + 236, y + 32)
  47. #      draw_actor_sp(actor, x + 236, y + 64)
  48.     #self.contents.draw_text(x - ch - 30 , y - cw/ 2, 84, 120, "转生次数:")
  49. #    draw_item(i)
  50.     end
  51.   end
  52.     def index=(index)
  53.     @index = index
  54.     # 刷新帮助文本 (update_help 定义了继承目标)
  55.     if self.active and @help_window != nil
  56.       update_help
  57.     end
  58.     # 刷新光标矩形
  59.     update_cursor_rect
  60.   end
  61.   
  62.   #--------------------------------------------------------------------------
  63.   # ● 更新光标举行
  64.   #--------------------------------------------------------------------------
  65.   def draw_item(index, color, font_name)
  66.     self.contents.font.color = color
  67.     self.contents.font.name = font_name
  68.     rect = Rect.new(113 * index, 4, self.contents.width - 128, 32)
  69.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  70.     self.contents.draw_text(rect, @menustatus[index])
  71.   end
  72. # def draw_item(index, color = normal_color)
  73. #   self.contents.font.color = color
  74. #   x = 104 + index * 80 + 40
  75. #    self.contents.draw_text(x-11, 0, 44, 32, @menustatus[index])
  76. # end
  77.   #--------------------------------------------------------------------------
  78.   # ● 项目无效化
  79.   #     index : 项目编号
  80.   #--------------------------------------------------------------------------
  81.   def disable_item(index)
  82.     draw_item(index, disabled_color)
  83.   end
  84.   #--------------------------------------------------------------------------
  85.   # ● 刷新光标矩形
  86.   #--------------------------------------------------------------------------
  87. def update_cursor_rect
  88.     # 光标位置不满 0 的情况下
  89.     if @index <= -1
  90.       self.cursor_rect.empty
  91.       
  92.       return
  93.     end
  94.     # 获取当前的行
  95. #    row = @index / @column_max
  96.     # 当前行被显示开头行前面的情况下
  97.   #  if row < self.top_row
  98.       # 从当前行向开头行滚动
  99. #     self.top_row = row
  100. #   end
  101.     # 当前行被显示末尾行之后的情况下
  102. #   if row > self.top_row + (self.page_row_max - 1)
  103.       # 从当前行向末尾滚动
  104. #     self.top_row = row - (self.page_row_max - 1)
  105. #   end
  106.     # 计算光标的宽
  107.     cursor_width = 90
  108.     #cursor_width = 536 / (@column_max + 1) + 1  #光标大小
  109.     # 计算光标坐标
  110.    
  111.     x = 0 + @index % @column_max * (cursor_width + 1) - 4 #光标位置调节 覆盖31行
  112.     y = @index / @column_max * 32 - self.oy
  113.     # 更新国标矩形
  114.     self.cursor_rect.set(x, y, cursor_width, 128)#(x, y, cursor_width, 32)
  115.   
  116.     end

  117. end
复制代码
金芒芒 发表于 2016-2-5 21:03:31
夜狠简单 发表于 2016-2-5 19:53
class Window_Base < Window
  def draw_actor_xdrs_lx(actor, x, y)
    self.contents.font.color = text ...


这段我改了,一下午了就就是没完成, 原来角色是竖者排的,用到横排的角色就重叠了,我不会脚本


夜狠简单 发表于 2016-2-5 19:53:28
class Window_Base < Window
  def draw_actor_xdrs_lx(actor, x, y)
    self.contents.font.color = text_color(3)
    self.contents.draw_text(8, 32, 120, 32, "转生次数:")
    i =  actor.id + LX_VARIABLE
    #self.z = 0
    self.contents.font.color = text_color(6)
    self.contents.draw_text(x,y, 80, 32, $game_variables[i].to_s)
  end
end
这段备份尝试自己修改一些参数
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-22 19:43

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表