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

Project1

 找回密码
 注册会员
搜索
查看: 2695|回复: 0
打印 上一主题 下一主题

[已经过期] 光标能在9个奇门里吗,只装备装饰品 鞋=装饰品

[复制链接]

Lv4.逐梦者

梦石
0
星屑
7559
在线时间
1315 小时
注册时间
2015-8-15
帖子
747
跳转到指定楼层
1
发表于 2016-3-28 15:26:59 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 金芒芒 于 2016-3-28 17:14 编辑

RUBY 代码复制
  1. #==============================================================================
  2. # ■ Window_EquipRight
  3. #------------------------------------------------------------------------------
  4. #  装备画面、显示角色现在装备的物品的窗口。
  5. #==============================================================================
  6.  
  7. class Window_Equip_right1 < Window_Selectable#_New
  8.   LAST0_X = 276   # 最后一项装备的x坐标  #开门  0
  9.   LAST0_Y = 194   # 最后一项装备的y坐标
  10.   LAST0_W = 48   # 最后一项装备的光标宽度
  11.   LAST0_H = 48   # 最后一项装备的光标高度
  12.  
  13.   LAST1_X = 300   # 最后一项装备的x坐标  #杜门  0
  14.   LAST1_Y = 218   # 最后一项装备的y坐标
  15.   LAST1_W = 48   # 最后一项装备的光标宽度
  16.   LAST1_H = 48   # 最后一项装备的光标高度
  17.  
  18.   LAST2_X = 370   # 最后一项装备的x坐标  #休门  0
  19.   LAST2_Y = 293   # 最后一项装备的y坐标
  20.   LAST2_W = 48   # 最后一项装备的光标宽度
  21.   LAST2_H = 48   # 最后一项装备的光标高度
  22.  
  23.   LAST3_X = 324   # 最后一项装备的x坐标  #生门  0
  24.   LAST3_Y = 389   # 最后一项装备的y坐标
  25.   LAST3_W = 48   # 最后一项装备的光标宽度
  26.   LAST3_H = 48   # 最后一项装备的光标高度
  27.  
  28.   LAST4_X = 276   # 最后一项装备的x坐标  #死门  0
  29.   LAST4_Y = 390   # 最后一项装备的y坐标
  30.   LAST4_W = 48   # 最后一项装备的光标宽度
  31.   LAST4_H = 48   # 最后一项装备的光标高度
  32.  
  33.   LAST5_X = 228   # 最后一项装备的x坐标  #惊门  0
  34.   LAST5_Y = 335   # 最后一项装备的y坐标
  35.   LAST5_W = 48   # 最后一项装备的光标宽度
  36.   LAST5_H = 48   # 最后一项装备的光标高度
  37.  
  38.   LAST_X = 276   # 最后一项装备的x坐标  #奇门  0
  39.   LAST_Y = 293   # 最后一项装备的y坐标
  40.   LAST_W = 48   # 最后一项装备的光标宽度
  41.   LAST_H = 48   # 最后一项装备的光标高度
  42.   #--------------------------------------------------------------------------
  43.   # ● 初始化对像
  44.   #     actor : 角色
  45.   #--------------------------------------------------------------------------
  46.   def initialize(actor)
  47.     super(120, 104, 368, 400)#(120, 104, 368, 400)
  48.     self.contents = Bitmap.new(width - 32, height - 32)
  49.     @actor = actor
  50.     refresh
  51.     self.index = 0
  52.   end
  53.   #--------------------------------------------------------------------------
  54.   # ● 获取物品
  55.   #--------------------------------------------------------------------------
  56.   def item
  57.     return @data[self.index]
  58.   end
  59.  
  60.   def set_actor(actor)
  61.     @actor = actor
  62.     refresh
  63.   end
  64.  
  65.   #--------------------------------------------------------------------------
  66.   # ● 刷新
  67.   #--------------------------------------------------------------------------
  68.   def refresh
  69.     self.contents.clear
  70.     draw_actor_name(@actor, 140, 0-5)
  71.     @data = []
  72.     @data.push($data_armors[@actor.armor4_id])
  73.     @data.push($data_armors[@actor.armor4_id])
  74.     @data.push($data_armors[@actor.armor4_id])
  75.     @data.push($data_armors[@actor.armor4_id])
  76.     @data.push($data_armors[@actor.armor4_id])
  77.     @item_max = @data.size
  78.     self.contents.font.color = system_color
  79.     y_r = 4 # 右窗口 y 坐标
  80.     self.contents.font.size = 20
  81. #   draw_walk_actor_graphic(@actor, 108, 60)
  82.     self.contents.draw_text(LAST_X + y_r, LAST_Y, 92, 32, "鞋")
  83.     self.contents.draw_text(LAST0_X + y_r, LAST0_Y, 92, 32, "鞋")
  84.     self.contents.draw_text(LAST1_X + y_r, LAST1_Y, 92, 32, "鞋")
  85.     self.contents.draw_text(LAST2_X + y_r, LAST2_Y, 92, 32, "鞋")
  86.     self.contents.draw_text(LAST3_X + y_r, LAST3_Y, 92, 32, "鞋")
  87.     self.contents.draw_text(LAST4_X + y_r, LAST4_Y, 92, 32, "鞋")
  88.     self.contents.draw_text(LAST5_X + y_r, LAST5_Y, 92, 32, "鞋")
  89.     self.contents.font.size = 18
  90.     draw_item_name(@data[0], LAST_X+3, LAST_Y)
  91.     draw_item_name(@data[1], LAST0_X+3, LAST0_Y)
  92.     draw_item_name(@data[2], LAST1_X+3, LAST1_Y)
  93.     draw_item_name(@data[3], LAST2_X+3, LAST2_Y)
  94.     draw_item_name(@data[4], LAST3_X+3, LAST3_Y)
  95.     draw_item_name(@data[5], LAST4_X+3, LAST4_Y)
  96.     draw_item_name(@data[6], LAST5_X+3, LAST5_Y)
  97.  
  98.     draw_actor_level(@actor, 12, 300)
  99.   end
  100.   #--------------------------------------------------------------------------
  101.   # ● 刷新帮助文本
  102.   #--------------------------------------------------------------------------
  103.   def update_help
  104.     @help_window.set_text(make_description(self.item))
  105.   end
  106.  
  107.   #--------------------------------------------------------------------------
  108.   # ● 刷新画面
  109.   #--------------------------------------------------------------------------
  110.   def update
  111.     super
  112.     # 可以移动光标的情况下
  113.     if self.active and @item_max > 0 and @index >= 0
  114.       # 方向键下被按下的情况下
  115.       if Input.repeat?(Input::DOWN)
  116.         # 列数不是 1 并且不与方向键下的按下状态重复的情况、
  117.         # 或光标位置在(项目数-列数)之前的情况下
  118.         if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
  119.            @index < @item_max - @column_max
  120.           # 光标向下移动
  121.           $game_system.se_play($data_system.cursor_se)
  122.           @index = (@index + @column_max) % @item_max
  123.         end
  124.       end
  125.       # 方向键上被按下的情况下
  126.       if Input.repeat?(Input::UP)
  127.         # 列数不是 1 并且不与方向键下的按下状态重复的情况、
  128.         # 或光标位置在列之后的情况下
  129.         if (@column_max == 1 and Input.trigger?(Input::UP)) or
  130.            @index >= @column_max
  131.           # 光标向上移动
  132.           $game_system.se_play($data_system.cursor_se)
  133.           @index = (@index - @column_max + @item_max) % @item_max
  134.         end
  135.       end
  136.       # 方向键右被按下的情况下
  137.       if Input.repeat?(Input::RIGHT)
  138.         # 列数为 2 以上并且、光标位置在(项目数 - 1)之前的情况下
  139.         if @column_max >= 2 and @index < @item_max - 1
  140.           # 光标向右移动
  141.           $game_system.se_play($data_system.cursor_se)
  142.           @index += 1
  143.         end
  144.       end
  145.       # 方向键左被按下的情况下
  146.       if Input.repeat?(Input::LEFT)
  147.         # 列数为 2 以上并且、光标位置在 0 之后的情况下
  148.         if @column_max >= 2 and @index > 0
  149.           # 光标向左移动
  150.           $game_system.se_play($data_system.cursor_se)
  151.           @index -= 1
  152.         end
  153.       end
  154.       # R 键被按下的情况下
  155.       if Input.repeat?(Input::R)
  156.         # 显示的最后行在数据中最后行上方的情况下
  157.         if self.top_row + (self.page_row_max -1) < (self.row_max -1)
  158.           # 光标向后移动一页
  159.           $game_system.se_play($data_system.cursor_se)
  160.           @index = [@index + self.page_item_max, @item_max -1].min
  161.           self.top_row += self.page_row_max
  162.         end
  163.       end
  164.       # L 键被按下的情况下
  165.       if Input.repeat?(Input::L)
  166.         # 显示的开头行在位置 0 之后的情况下
  167.         if self.top_row > 0
  168.           # 光标向前移动一页
  169.           $game_system.se_play($data_system.cursor_se)
  170.           @index = [@index - self.page_item_max, 0].max
  171.           self.top_row -= self.page_row_max
  172.         end
  173.       end
  174.     end
  175.     # 刷新帮助文本 (update_help 定义了继承目标)
  176.     if self.active and @help_window != nil
  177.       update_help
  178.     end
  179.  
  180.   end
  181.   #-----------------------------奇门1
  182.   # ○ 刷新光标矩形
  183.   #-----------------------------
  184.   def update_cursor_rect
  185. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  186.     # 最后一项的情况
  187.     if @index == @item_max - 1
  188.       self.cursor_rect.set(LAST_X, LAST_Y, LAST_W, LAST_H)
  189.     # 其他情况
  190.     else
  191.       if @index <= -2
  192.         self.cursor_rect.empty
  193.       elsif @index == -1
  194.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  195.       else
  196.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  197.       end
  198.     end
  199.   end
  200.  
  201.   #-----------------------------开门2
  202.   # ○ 刷新光标矩形
  203.   #-----------------------------
  204.   def update_cursor_rect
  205. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  206.     # 最后一项的情况
  207.     if @index == @item_max - 1
  208.       self.cursor_rect.set(LAST0_X, LAST0_Y, LAST0_W, LAST0_H)
  209.     # 其他情况
  210.     else
  211.       if @index <= -2
  212.         self.cursor_rect.empty
  213.       elsif @index == -1
  214.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  215.       else
  216.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  217.       end
  218.     end
  219.   end
  220.  
  221.   #-----------------------------杜门3
  222.   # ○ 刷新光标矩形
  223.   #-----------------------------
  224.   def update_cursor_rect
  225. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  226.     # 最后一项的情况
  227.     if @index == @item_max - 1
  228.       self.cursor_rect.set(LAST1_X, LAST1_Y, LAST1_W, LAST1_H)
  229.     # 其他情况
  230.     else
  231.       if @index <= -2
  232.         self.cursor_rect.empty
  233.       elsif @index == -1
  234.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  235.       else
  236.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  237.       end
  238.     end
  239.   end   
  240.  
  241.   #-----------------------------休门4
  242.   # ○ 刷新光标矩形
  243.   #-----------------------------
  244.   def update_cursor_rect
  245. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  246.     # 最后一项的情况
  247.     if @index == @item_max - 1
  248.       self.cursor_rect.set(LAST2_X, LAST2_Y, LAST2_W, LAST2_H)
  249.     # 其他情况
  250.     else
  251.       if @index <= -2
  252.         self.cursor_rect.empty
  253.       elsif @index == -1
  254.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  255.       else
  256.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  257.       end
  258.     end
  259.   end  
  260.  
  261.   #-----------------------------生门5
  262.   # ○ 刷新光标矩形
  263.   #-----------------------------
  264.   def update_cursor_rect
  265. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  266.     # 最后一项的情况
  267.     if @index == @item_max - 1
  268.       self.cursor_rect.set(LAST3_X, LAST3_Y, LAST3_W, LAST3_H)
  269.     # 其他情况
  270.     else
  271.       if @index <= -2
  272.         self.cursor_rect.empty
  273.       elsif @index == -1
  274.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  275.       else
  276.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  277.       end
  278.     end
  279.   end  
  280.  
  281.   #-----------------------------死门6
  282.   # ○ 刷新光标矩形
  283.   #-----------------------------
  284.   def update_cursor_rect
  285. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  286.     # 最后一项的情况
  287.     if @index == @item_max - 1
  288.       self.cursor_rect.set(LAST4_X, LAST4_Y, LAST4_W, LAST4_H)
  289.     # 其他情况
  290.     else
  291.       if @index <= -2
  292.         self.cursor_rect.empty
  293.       elsif @index == -1
  294.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  295.       else
  296.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  297.       end
  298.     end
  299.   end
  300.  
  301.   #-----------------------------惊门7
  302.   # ○ 刷新光标矩形
  303.   #-----------------------------
  304.   def update_cursor_rect
  305. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  306.     # 最后一项的情况
  307.     if @index == @item_max - 1
  308.       self.cursor_rect.set(LAST5_X, LAST5_Y, LAST5_W, LAST5_H)
  309.     # 其他情况
  310.     else
  311.       if @index <= -2
  312.         self.cursor_rect.empty
  313.       elsif @index == -1
  314.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  315.       else
  316.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  317.       end
  318.     end
  319.   end
  320.  
  321. end

奇门贯标.jpg (187.65 KB, 下载次数: 2)

奇门贯标.jpg

奇门.jpg (174.54 KB, 下载次数: 5)

奇门.jpg
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2024-9-22 15:26

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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