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

Project1

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

[已经过期] 跪求 VA菜单如何变成图中的样子

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
28 小时
注册时间
2013-6-18
帖子
18
跳转到指定楼层
1
发表于 2016-12-15 09:56:42 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x


脚本盲,研究了很多大大的脚本都没有找到好的方法

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

2
发表于 2016-12-15 11:04:31 | 只看该作者
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
582
在线时间
310 小时
注册时间
2016-2-29
帖子
210
3
发表于 2016-12-15 13:43:32 | 只看该作者
立绘放在Pictures文件夹里,图片名称跟主角一样,此脚本被我修改过,不知道你能不能用
  1. =begin
  2. ===============================================================================
  3.   显示立绘以及简易的解谜菜单   By.椎名  2014-09-09
  4. ===============================================================================
  5.   【使用说明】
  6.   
  7.   一个简单的解谜游戏菜单,基本都是默认的窗口,
  8.   至于坐标宽度和列数之类的设置,请自行修改。
  9.   
  10.   直接main前insert可用。
  11.   与其他菜单类脚本冲突可能性极大,
  12.   不提供整合和兼容服务。
  13.   
  14.   
  15.   脚本中搜索:
  16.   ·“设置部分”开始设定各个项目
  17.     你可以在这里设定包含字号,立绘等一系列有关的项目。
  18.    
  19.   ·“脚本部分-Scene”查看Scene的修改内容
  20.     这里可以调整一部分窗口的坐标和宽度等。
  21.    
  22.   ·“脚本部分-Window”查看各个窗口的修改内容
  23.     这里只是对某些窗口内容的重新定义。
  24.    
  25.   ·“脚本部分-立绘”为新增的显示立绘脚本
  26.     立绘的窗口,默认设定是滑动和淡入,关闭滑动不淡入。
  27.     你也可以通过在这里设定坐标来达到从下方滑入画面的效果。
  28.   
  29.   
  30.   发现BUG欢迎随时回报。
  31.   
  32. =end


  33. #####################################
  34. # 设置部分
  35. #####################################

  36. module SHIINA
  37.   # 调整字号
  38.   FONT_SIZE = 23
  39.   
  40.   # 是否显示立绘
  41.   IMAGE = true
  42.   
  43.   # 固定的立绘(为false时立绘滚动和淡入效果)
  44.   LOCK_IMAGE = false
  45.   
  46.   # 立绘左右翻转(没错这是窝偷懒用的)(← ←结果偷懒不成。。但是还是留着吧)
  47.   IMAGE_MIRROR = false
  48.   
  49.   # 立绘的滑动速度(立绘不固定时生效)
  50.   IMAGE_SLIDE_SPD = 10
  51.   
  52.   # 立绘文件名(放在picture文件夹内,赋值nil的话将使用菜单当前角色的名字为名的图片)
  53.   IMAGE_NAME = nil
  54.   
  55.   # 是否使用物品分类选择
  56.   ITEM_TYPE = true
  57.   
  58.   # 加入武器和防具分类?(使用物品分类为true时生效)
  59.   WEAPON_ARMOR = true
  60.   
  61.   # 是否可以整队
  62.   FORMATION = false
  63.   
  64.   # 是否显示金钱窗口
  65.   GOLD = true
  66.   
  67.   # 是否显示人物的状态窗口
  68.   STATUS = true
  69.   
  70.   # 状态窗口内容高度(设置为false则返回默认高度)
  71.   STATUS_HEIGHT = 98
  72.   
  73.   # 状态窗口的显示项目,不显示的项目改为false或者nil,
  74.   STATUS_ITEM = [true,   # 脸图
  75.                  true,   # 名字
  76.                  true,   # 等级
  77.                  true,   # 状态图标
  78.                  true,   # 职业
  79.                  true,   # HP
  80.                  true    # MP
  81.                  ]
  82. end
  83.                
  84. # 重置整体字号
  85. Font.default_size = SHIINA::FONT_SIZE

  86. #----------------------设置部分结束----------------------#


  87. #####################################
  88. # 脚本部分-Scene
  89. #####################################
  90. #==============================================================================
  91. # ■ Scene_MenuBase
  92. #==============================================================================

  93. #~ class Scene_MenuBase < Scene_Base
  94. #~   #--------------------------------------------------------------------------
  95. #~   # ● 生成帮助窗口
  96. #~   #--------------------------------------------------------------------------
  97. #~   def create_help_window
  98. #~     @help_window = Window_Help.new
  99. #~     @help_window.visible = false
  100. #~     @help_window.viewport = @viewport
  101. #~   end
  102. #~   #--------------------------------------------------------------------------
  103. #~   # ● 生成角色窗口
  104. #~   #--------------------------------------------------------------------------
  105. #~   def create_actor_window
  106. #~     @actor_window = Window_MenuActor.new
  107. #~     @actor_window.set_handler(:ok,     method(:on_actor_ok))
  108. #~     @actor_window.set_handler(:cancel, method(:on_actor_cancel))
  109. #~   end
  110. #~   #--------------------------------------------------------------------------
  111. #~   # ● 获取当前选中的物品
  112. #~   #--------------------------------------------------------------------------
  113. #~   def item
  114. #~     @item_window.item
  115. #~   end
  116. #~   #--------------------------------------------------------------------------
  117. #~   # ● 获取物品的使用者(直接指向当前角色)
  118. #~   #--------------------------------------------------------------------------
  119. #~   def user
  120. #~     return @actor
  121. #~     $game_party.movable_members.max_by {|member| member.pha }
  122. #~   end
  123. #~   #--------------------------------------------------------------------------
  124. #~   # ● 显示子窗口
  125. #~   #--------------------------------------------------------------------------
  126. #~   def show_sub_window(window)
  127. #~     width_remain = Graphics.width - window.width
  128. #~     window.x = 0
  129. #~     @viewport.rect.x = window.width
  130. #~     @viewport.rect.width = Graphics.width - window.width
  131. #~     window.show.activate
  132. #~   end
  133. #~   #--------------------------------------------------------------------------
  134. #~   # ● 隐藏子窗口
  135. #~   #--------------------------------------------------------------------------
  136. #~   def hide_sub_window(window)
  137. #~     @viewport.rect.x = @viewport.ox = 0
  138. #~     @viewport.rect.width = Graphics.width
  139. #~     window.hide.deactivate
  140. #~     activate_item_window
  141. #~   end
  142. #~   #--------------------------------------------------------------------------
  143. #~   # ● 角色“确定”
  144. #~   #--------------------------------------------------------------------------
  145. #~   def on_actor_ok
  146. #~     if item_usable?
  147. #~       use_item
  148. #~     else
  149. #~       Sound.play_buzzer
  150. #~     end
  151. #~   end
  152. #~   #--------------------------------------------------------------------------
  153. #~   # ● 角色“取消”
  154. #~   #--------------------------------------------------------------------------
  155. #~   def on_actor_cancel
  156. #~     hide_sub_window(@actor_window)
  157. #~   end
  158. #~   #--------------------------------------------------------------------------
  159. #~   # ● 确定物品
  160. #~   #--------------------------------------------------------------------------
  161. #~   def determine_item
  162. #~     if item.for_friend?
  163. #~       show_sub_window(@actor_window)
  164. #~       @actor_window.select_for_item(item)
  165. #~     else
  166. #~       use_item
  167. #~       activate_item_window
  168. #~     end
  169. #~   end
  170. #~   #--------------------------------------------------------------------------
  171. #~   # ● 启用物品窗口
  172. #~   #--------------------------------------------------------------------------
  173. #~   def activate_item_window
  174. #~     @item_window.refresh
  175. #~     @item_window.activate
  176. #~   end
  177. #~   #--------------------------------------------------------------------------
  178. #~   # ● 获取物品的使用目标数组
  179. #~   #--------------------------------------------------------------------------
  180. #~   def item_target_actors
  181. #~     if !item.for_friend?
  182. #~       []
  183. #~     elsif item.for_all?
  184. #~       $game_party.members
  185. #~     else
  186. #~       [$game_party.members[@actor_window.index]]
  187. #~     end
  188. #~   end
  189. #~   #--------------------------------------------------------------------------
  190. #~   # ● 判定物品是否可以使用
  191. #~   #--------------------------------------------------------------------------
  192. #~   def item_usable?
  193. #~     user.usable?(item) && item_effects_valid?
  194. #~   end
  195. #~   #--------------------------------------------------------------------------
  196. #~   # ● 判定物品的效果是否有效
  197. #~   #--------------------------------------------------------------------------
  198. #~   def item_effects_valid?
  199. #~     item_target_actors.any? do |target|
  200. #~       target.item_test(user, item)
  201. #~     end
  202. #~   end
  203. #~   #--------------------------------------------------------------------------
  204. #~   # ● 对角色使用物品
  205. #~   #--------------------------------------------------------------------------
  206. #~   def use_item_to_actors
  207. #~     item_target_actors.each do |target|
  208. #~       item.repeats.times { target.item_apply(user, item) }
  209. #~     end
  210. #~   end
  211. #~   #--------------------------------------------------------------------------
  212. #~   # ● 使用物品
  213. #~   #--------------------------------------------------------------------------
  214. #~   def use_item
  215. #~     play_se_for_item
  216. #~     user.use_item(item)
  217. #~     use_item_to_actors
  218. #~     check_common_event
  219. #~     check_gameover
  220. #~     @actor_window.refresh
  221. #~   end
  222. #~   #--------------------------------------------------------------------------
  223. #~   # ● 公共事件预定判定
  224. #~   #    如果预约了事件的调用,则切换到地图画面。
  225. #~   #--------------------------------------------------------------------------
  226. #~   def check_common_event
  227. #~     SceneManager.goto(Scene_Map) if $game_temp.common_event_reserved?
  228. #~   end
  229. #~ end



  230. #==============================================================================
  231. # ■ Scene_Menu
  232. #==============================================================================

  233. class Scene_Menu < Scene_MenuBase
  234.   #--------------------------------------------------------------------------
  235.   # ● 开始处理
  236.   #--------------------------------------------------------------------------
  237.   def start
  238.     super
  239.     create_image
  240.     create_gold_window if SHIINA::GOLD
  241.     create_command_window
  242.     create_status_window if SHIINA::STATUS
  243.     create_help_window
  244.     create_category_window
  245. #    create_item_window
  246. #    create_actor_window
  247.   end
  248.   
  249.   #--------------------------------------------------------------------------
  250.   # ● 生成立绘
  251.   #--------------------------------------------------------------------------
  252.   def create_image
  253.     @image = Image.new(@actor)
  254.   end
  255.   
  256.   #--------------------------------------------------------------------------
  257.   # ● 生成指令窗口
  258.   #--------------------------------------------------------------------------
  259.   def create_command_window
  260.     @command_window = Window_MenuCommand.new
  261.     @command_window.y = SHIINA::GOLD ?
  262.                         @gold_window.y - @command_window.height :
  263.                         Graphics.height - @command_window.height
  264.    
  265.     @command_window.set_handler(:item,      method(:command_item))
  266.     @command_window.set_handler(:formation, method(:command_formation)) if SHIINA::FORMATION
  267.     @command_window.set_handler(:skill,     method(:command_personal))
  268.     @command_window.set_handler(:equip,     method(:command_personal))
  269.     @command_window.set_handler(:status,    method(:command_personal))
  270.     @command_window.set_handler(:save,      method(:command_save))
  271.     @command_window.set_handler(:game_end,  method(:command_game_end))
  272.     @command_window.set_handler(:cancel,    method(:return_scene))
  273.     @command_window.set_handler(:pageup,    method(:prev_actor))
  274.     @command_window.set_handler(:pagedown,  method(:next_actor))
  275.     # 立绘塞进指令窗口
  276.     @command_window.image = @image
  277.   end

  278.   #--------------------------------------------------------------------------
  279.   # ● 生成金钱窗口
  280.   #--------------------------------------------------------------------------
  281.   def create_gold_window
  282.     @gold_window = Window_Gold.new
  283.     @gold_window.x = 0
  284.     @gold_window.y = Graphics.height - @gold_window.height
  285.   end
  286.   #--------------------------------------------------------------------------
  287.   # ● 生成状态窗口
  288.   #--------------------------------------------------------------------------
  289.   def create_status_window
  290.     @status_window = Window_MenuStatus.new(@command_window.width, 0)
  291.     @status_window.refresh_nanikore(@actor)
  292.     @status_window.y = Graphics.height - @status_window.height
  293.   end
  294.   #--------------------------------------------------------------------------
  295.   # ● 生成分类窗口
  296.   #--------------------------------------------------------------------------
  297.   def create_category_window
  298.     @category_window = Window_ItemCategory.new
  299.     @category_window.viewport = @viewport
  300.     @category_window.help_window = @help_window
  301.     @category_window.y = @help_window.height
  302.     @category_window.deactivate
  303.     @category_window.visible = false
  304.     @category_window.set_handler(:ok,     method(:on_category_ok))
  305.     @category_window.set_handler(:cancel, method(:on_category_cancel))
  306.   end
  307.   #--------------------------------------------------------------------------
  308.   # ● 生成物品窗口
  309.   #--------------------------------------------------------------------------
  310. #~   def create_item_window
  311. #~     item_window_y      = @category_window.y + (SHIINA::ITEM_TYPE ? @category_window.height : 0)
  312. #~     item_window_height = Graphics.height - item_window_y - (Graphics.height - @command_window.y)
  313. #~     @item_window = Window_ItemList.new(@category_window.x, item_window_y, @command_window.width, item_window_height)
  314. #~     @item_window.viewport = @viewport
  315. #~     @item_window.help_window = @help_window
  316. #~     @item_window.deactivate
  317. #~     @item_window.visible = false
  318. #~     @item_window.set_handler(:ok,     method(:on_item_ok))
  319. #~     @item_window.set_handler(:cancel, method(:on_item_cancel))
  320. #~     @category_window.item_window = @item_window
  321. #~   end
  322.   #--------------------------------------------------------------------------
  323.   # ● 指令“物品”
  324.   #--------------------------------------------------------------------------
  325. #~   def command_item
  326. #~     if SHIINA::ITEM_TYPE
  327. #~       @category_window.activate
  328. #~       @category_window.visible = true
  329. #~       @item_window.visible = true
  330. #~     else
  331. #~       @item_window.category = :item
  332. #~       @item_window.activate
  333. #~       @item_window.select_last
  334. #~       @item_window.visible = true
  335. #~       @help_window.visible = @item_window.visible
  336. #~     end
  337. #~   end
  338.   
  339.   # ● 指令“技能”“装备”“状态”
  340.   #--------------------------------------------------------------------------
  341.   def command_personal
  342.     @status_window.select_last
  343.     @status_window.activate
  344.     @status_window.set_handler(:ok,     method(:on_personal_ok))
  345.     @status_window.set_handler(:cancel, method(:on_personal_cancel))
  346.   end
  347.   #--------------------------------------------------------------------------
  348.   # ● 指令“整队”
  349.   #--------------------------------------------------------------------------
  350.   def command_formation
  351.     return unless SHIINA::STATUS
  352.     @status_window.select_last
  353.     @status_window.activate
  354.     @status_window.set_handler(:ok,     method(:on_formation_ok))
  355.     @status_window.set_handler(:cancel, method(:on_formation_cancel))
  356.   end
  357.   #--------------------------------------------------------------------------
  358.   # ● 指令“存档”
  359.   #--------------------------------------------------------------------------
  360.   def command_save
  361.     SceneManager.call(Scene_Save)
  362.   end
  363.   #--------------------------------------------------------------------------
  364.   # ● 指令“结束游戏”
  365.   #--------------------------------------------------------------------------
  366.   def command_game_end
  367.     SceneManager.call(Scene_End)
  368.   end
  369.   #--------------------------------------------------------------------------
  370.   # ● 整队“确定”
  371.   #--------------------------------------------------------------------------
  372.   def on_formation_ok
  373.     if @status_window.pending_index >= 0
  374.       $game_party.swap_order(@status_window.index,
  375.                              @status_window.pending_index)
  376.       @status_window.pending_index = -1
  377.       @status_window.redraw_item(@status_window.index)
  378.     else
  379.       @status_window.pending_index = @status_window.index
  380.     end
  381.     @status_window.activate
  382.   end
  383.   #--------------------------------------------------------------------------
  384.   # ● 整队“取消”
  385.   #--------------------------------------------------------------------------
  386.   def on_formation_cancel
  387.     if @status_window.pending_index >= 0
  388.       @status_window.pending_index = -1
  389.       @status_window.activate
  390.     else
  391.       @status_window.unselect
  392.       @command_window.activate
  393.     end
  394.   end
  395.   #--------------------------------------------------------------------------
  396.   # ● 分类“确定”
  397.   #--------------------------------------------------------------------------
  398.   def on_category_ok
  399.     @item_window.activate
  400.     @item_window.select_last
  401.     @help_window.visible = @item_window.visible
  402.   end
  403.   #--------------------------------------------------------------------------
  404.   # ● 分类“取消”
  405.   #--------------------------------------------------------------------------
  406.   def on_category_cancel
  407.     @category_window.deactivate
  408.     @category_window.visible = false
  409.     @item_window.visible = false
  410.     @help_window.visible = @item_window.visible
  411.     @command_window.activate
  412.   end
  413.   #--------------------------------------------------------------------------
  414.   # ● 物品“确定”
  415.   #--------------------------------------------------------------------------
  416.   def on_item_ok
  417.     $game_party.last_item.object = item
  418.     determine_item
  419.   end
  420.   #--------------------------------------------------------------------------
  421.   # ● 物品“取消”
  422.   #--------------------------------------------------------------------------
  423.   def on_item_cancel
  424.     @item_window.unselect
  425.     if SHIINA::ITEM_TYPE
  426.       @category_window.activate
  427.       @help_window.visible = false
  428.     else
  429.       @item_window.visible = false
  430.       @help_window.visible = @item_window.visible
  431.       @command_window.activate
  432.     end
  433.   end
  434.   #--------------------------------------------------------------------------
  435.   # ● 播放使用物品声效
  436.   #--------------------------------------------------------------------------
  437. #~   def play_se_for_item
  438. #~     Sound.play_use_item
  439. #~   end
  440. #~   #--------------------------------------------------------------------------
  441. #~   # ● 使用物品
  442. #~   #--------------------------------------------------------------------------
  443. #~   def use_item
  444. #~     super
  445. #~     @item_window.redraw_current_item
  446. #~   end
  447.   #--------------------------------------------------------------------------
  448.   # ● 添加切换角色定义(刷新立绘和人物信息窗口)
  449.   #--------------------------------------------------------------------------
  450.   # 上一个角色
  451.   alias image_prev_actor prev_actor
  452.   def prev_actor
  453.     image_prev_actor
  454.     @command_window.activate
  455.     @command_window.select_last
  456.     @command_window.refresh_image(@actor)
  457.     @status_window.refresh_nanikore(@actor)
  458.   end
  459.   # 下一个角色
  460.   alias image_next_actor next_actor
  461.   def next_actor
  462.     image_next_actor
  463.     @command_window.activate
  464.     @command_window.select_last
  465.     @command_window.refresh_image(@actor)
  466.     @status_window.refresh_nanikore(@actor)
  467.   end
  468. end

  469. #----------------------Scene部分结束----------------------#



  470. #####################################
  471. # 脚本部分-Window
  472. #####################################
  473. #==============================================================================
  474. # ■ Window_MenuCommand
  475. #------------------------------------------------------------------------------
  476. #  菜单画面中显示指令的窗口
  477. #==============================================================================

  478. class Window_MenuCommand < Window_Command
  479.   # 立绘图像
  480.   attr_accessor  :image
  481.   #--------------------------------------------------------------------------
  482.   # ● 向指令列表添加主要的指令
  483.   #--------------------------------------------------------------------------
  484.   def add_main_commands
  485.     add_command(Vocab::item,   :item,   main_commands_enabled)
  486.   end
  487.   #--------------------------------------------------------------------------
  488.   # ● 添加整队指令
  489.   #--------------------------------------------------------------------------
  490.   def add_formation_command
  491.     return unless SHIINA::FORMATION
  492.     add_command(Vocab::formation, :formation, formation_enabled)
  493.   end
  494.   #--------------------------------------------------------------------------
  495.   # ● 刷新立绘
  496.   #--------------------------------------------------------------------------
  497.   def refresh_image(actor)
  498.     @image.refresh(actor)
  499.   end
  500.   #--------------------------------------------------------------------------
  501.   # ● 更新立绘
  502.   #--------------------------------------------------------------------------
  503.   alias image_update update
  504.   def update
  505.     image_update
  506.     @image.update if @image
  507.   end
  508.   #--------------------------------------------------------------------------
  509.   # ● 释放里立绘
  510.   #--------------------------------------------------------------------------
  511.   alias image_dispose dispose
  512.   def dispose
  513.     image_dispose
  514.     @image.dispose
  515.   end
  516. end

  517. #==============================================================================
  518. # ■ Window_ItemCategory
  519. #------------------------------------------------------------------------------
  520. #  物品画面和商店画面中,显示装备、所持物品等项目列表的窗口。
  521. #==============================================================================

  522. class Window_ItemCategory < Window_HorzCommand
  523.   #--------------------------------------------------------------------------
  524.   # ● 生成指令列表
  525.   #--------------------------------------------------------------------------
  526.   def make_command_list
  527.     add_command(Vocab::item,     :item)
  528.     add_command(Vocab::weapon,   :weapon) if SHIINA::WEAPON_ARMOR
  529.     add_command(Vocab::armor,    :armor) if SHIINA::WEAPON_ARMOR
  530.     add_command(Vocab::key_item, :key_item)
  531.   end
  532. end

  533. #==============================================================================
  534. # ■ Window_ItemList
  535. #------------------------------------------------------------------------------
  536. #  物品画面中,显示持有物品的窗口。
  537. #==============================================================================

  538. #~ class Window_ItemList < Window_Selectable
  539. #~   #--------------------------------------------------------------------------
  540. #~   # ● 获取列数
  541. #~   #--------------------------------------------------------------------------
  542. #~   def col_max
  543. #~     return 1
  544. #~   end
  545. #~ end

  546. #==============================================================================
  547. # ■ Window_MenuStatus
  548. #------------------------------------------------------------------------------
  549. #  菜单画面中,显示队伍成员状态的窗口
  550. #==============================================================================

  551. class Window_MenuStatus < Window_Selectable
  552.   #--------------------------------------------------------------------------
  553.   # ● 获取窗口的宽度
  554.   #--------------------------------------------------------------------------
  555.   def window_width
  556.     Graphics.width - 160
  557.   end
  558.   #--------------------------------------------------------------------------
  559.   # ● 最大数目
  560.   #--------------------------------------------------------------------------
  561.   def item_max
  562.     return 1
  563.   end
  564.   #--------------------------------------------------------------------------
  565.   # ● 获取窗口的高度
  566.   #--------------------------------------------------------------------------
  567.   def window_height
  568.     item_max * item_height + standard_padding * 2
  569.   end
  570.   #--------------------------------------------------------------------------
  571.   # ● 刷新角色(为了位置refresh的结构只能另外写个了呢)
  572.   #--------------------------------------------------------------------------
  573.   def refresh_nanikore(actor)
  574.     @actor = actor
  575.     refresh
  576.   end
  577.   #--------------------------------------------------------------------------
  578.   # ● 刷新(直接描绘当前角色信息)
  579.   #--------------------------------------------------------------------------
  580.   def refresh
  581.     contents.clear
  582.     return unless @actor
  583.     index = 0
  584.     rect = item_rect(index)
  585.     draw_item_background(index)
  586.     draw_actor_face(@actor, rect.x + 1, rect.y + 1) if SHIINA::STATUS_ITEM[0]
  587.     draw_actor_simple_status(@actor, rect.x + 108, rect.y + line_height / 2)
  588.   end
  589.   #--------------------------------------------------------------------------
  590.   # ● 绘制项目(没用了呢)
  591.   #--------------------------------------------------------------------------
  592.   def draw_item(index); ; end
  593.   #--------------------------------------------------------------------------
  594.   # ● 绘制简单的状态
  595.   #--------------------------------------------------------------------------
  596.   def draw_actor_simple_status(actor, x, y)
  597.     draw_actor_name(actor, x, y)                       if SHIINA::STATUS_ITEM[1]
  598.     draw_actor_level(actor, x, y + line_height * 1)    if SHIINA::STATUS_ITEM[2]
  599.     draw_actor_icons(actor, x, y + line_height * 2)    if SHIINA::STATUS_ITEM[3]
  600.     draw_actor_class(actor, x + 120, y)                if SHIINA::STATUS_ITEM[4]
  601.     draw_actor_hp(actor, x + 120, y + line_height * 1) if SHIINA::STATUS_ITEM[5]
  602.     draw_actor_mp(actor, x + 120, y + line_height * 2) if SHIINA::STATUS_ITEM[6]
  603.   end
  604.   #--------------------------------------------------------------------------
  605.   # ● 获取项目的高度
  606.   #--------------------------------------------------------------------------
  607.   def item_height
  608.     if SHIINA::STATUS_HEIGHT
  609.       return SHIINA::STATUS_HEIGHT
  610.     else
  611.       return (Graphics.height - standard_padding * 2) / 4
  612.     end
  613.   end
  614. end

  615. #==============================================================================
  616. # ■ Window_MenuActor
  617. #------------------------------------------------------------------------------
  618. #  显示物品使用或技能使用的选择目标的窗口
  619. #==============================================================================

  620. class Window_MenuActor < Window_MenuStatus
  621.   #--------------------------------------------------------------------------
  622.   # ● 刷新(父上已经走上奇怪的路线,只能从爷爷那边搬过来→_→)
  623.   #--------------------------------------------------------------------------
  624.   def refresh
  625.     contents.clear
  626.     draw_all_items
  627.   end
  628.   #--------------------------------------------------------------------------
  629.   # ● 获取项目数
  630.   #--------------------------------------------------------------------------
  631.   def item_max
  632.     $game_party.members.size
  633.   end
  634.   #--------------------------------------------------------------------------
  635.   # ● 绘制项目
  636.   #--------------------------------------------------------------------------
  637.   def draw_item(index)
  638.     actor = $game_party.members[index]
  639.     enabled = $game_party.battle_members.include?(actor)
  640.     rect = item_rect(index)
  641.     draw_item_background(index)
  642.     draw_actor_face(actor, rect.x + 1, rect.y + 1) if SHIINA::STATUS_ITEM[0]
  643.     draw_actor_simple_status(actor, rect.x + 108, rect.y + line_height / 2)
  644.   end
  645. end
  646. #----------------------Window部分结束----------------------#


  647. #####################################
  648. # 脚本部分-立绘
  649. #####################################

  650. class Image < Sprite
  651.   
  652.   def initialize(actor, x=get_x, y=Graphics.height)
  653.     super(nil)
  654.     @actor = actor
  655.     self.mirror = SHIINA::IMAGE_MIRROR
  656.     self.bitmap = Cache.picture(get_pic_name)
  657.     self.oy = self.height
  658.     self.opacity = 0 unless SHIINA::LOCK_IMAGE
  659.     self.x = x
  660.     self.y = y
  661.     set
  662.     setn(0)
  663.   end
  664.   
  665.   def get_pic_name
  666.     actor_name = @actor ? @actor.name : $game_party.members[0].name
  667.     return SHIINA::IMAGE_NAME.nil? ? actor_name : SHIINA::IMAGE_NAME
  668.   end
  669.   
  670.   def refresh(actor)
  671.     @actor = actor
  672.     self.bitmap = Cache.picture(get_pic_name)
  673.     return if SHIINA::LOCK_IMAGE
  674.     self.opacity = 0
  675.     set(get_x)
  676.     setn(0)
  677.   end
  678.   
  679.   def get_x
  680.     SHIINA::LOCK_IMAGE ? 0 : 32 * 4
  681.   end
  682.   
  683.   def spd
  684.     SHIINA::IMAGE_SLIDE_SPD
  685.   end
  686.   
  687.   def set(x=self.x, y=self.y)
  688.     self.x = x
  689.     self.y = y
  690.     @nx = x
  691.     @ny = y
  692.   end
  693.   
  694.   def setn(x=self.x, y=self.y)
  695.     @nx = x
  696.     @ny = y
  697.   end
  698.   
  699.   def update
  700.     super
  701.     return if SHIINA::LOCK_IMAGE
  702.     update_slide
  703.   end
  704.   
  705.   def slide_over?
  706.     return (self.x==@nx && self.y=@ny)
  707.   end
  708.   
  709.   def update_slide
  710.     self.opacity += 20 unless SHIINA::LOCK_IMAGE
  711.     return if slide_over?
  712.     if self.x + spd < @nx
  713.       self.x += spd
  714.     elsif self.x - spd > @nx
  715.       self.x -= spd
  716.     elsif self.x != @nx
  717.       self.x = @nx
  718.     end
  719.     if self.y + spd < @ny
  720.       self.y += spd
  721.     elsif self.y - spd > @ny
  722.       self.y -= spd
  723.     elsif self.y != @ny
  724.       self.y = @ny
  725.     end
  726.   end
  727.   
  728. end

  729. #----------------------立绘部分结束----------------------#
复制代码
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
582
在线时间
310 小时
注册时间
2016-2-29
帖子
210
4
发表于 2016-12-15 13:44:22 | 只看该作者
效果图:
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-20 07:56

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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