| 赞 | 3 |
| VIP | |
| 好人卡 | |
| 积分 | 22 |
| 经验 | |
| 最后登录 | 2025-7-3 |
| 在线时间 | 1015 小时 |
- 梦石
- 0
- 星屑
- 2245
- 在线时间
- 1015 小时
- 注册时间
- 2015-10-17
- 回帖
- 1077
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 fjm 于 2017-4-1 18:55 编辑
默认的是两个,如何多显示几个,比如4个
- class Scene_Battle < Scene_Base
- def start
- super
- create_spriteset
- create_all_windows
- BattleManager.method_wait_for_message = method(:wait_for_message)
- @icon_rotate = 0
- end
- def update_basic
- super
- $game_timer.update
- $game_troop.update
- @spriteset.update
- update_info_viewport
- update_message_open
- @icon_rotate += 1
- if @icon_rotate > 120
- $game_party.alive_members.each{|i| i.sort_states}
- @status_window.refresh
- @icon_rotate = 0
- end
- end
- def update_info_viewport
- move_info_viewport(0) if @party_command_window.active
- move_info_viewport(0) if @actor_command_window.active
- move_info_viewport(0) if BattleManager.in_turn?
- end
- def create_party_command_window
- @party_command_window = Window_PartyCommand.new
- @party_command_window.y = @info_viewport.rect.y - @party_command_window.height
- @party_command_window.set_handler(:fight, method(:command_fight))
- @party_command_window.set_handler(:escape, method(:command_escape))
- @party_command_window.unselect
- end
- def create_status_window
- @status_window = Window_BattleStatus.new
- end
- def create_actor_command_window
- @actor_command_window = Window_ActorCommand.new
- @actor_command_window.y = @info_viewport.rect.y - @actor_command_window.height
- #@actor_command_window.x = Graphics.width - @actor_command_window.width
- @actor_command_window.set_handler(:attack, method(:command_attack))
- @actor_command_window.set_handler(:skill, method(:command_skill))
- @actor_command_window.set_handler(:guard, method(:command_guard))
- @actor_command_window.set_handler(:item, method(:command_item))
- @actor_command_window.set_handler(:cancel, method(:prior_command))
- end
- end
- class Window_BattleEnemy < Window_Selectable
- def initialize(info_viewport)
- super(0, info_viewport.rect.y, window_width, fitting_height(6))
- refresh
- self.visible = false
- @info_viewport = info_viewport
- end
- def window_width
- Graphics.width
- end
- end
- class Window_PartyCommand < Window_Command
- def window_width
- return 100
- end
- def visible_line_number
- return 3
- end
- def alignment
- return 1
- end
- end
- class Window_BattleStatus < Window_Selectable
- def window_width
- Graphics.width
- end
- def col_max
- return 2
- end
- def draw_actor_icons(actor, x, y, width = 96)
- icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
- icons.each_with_index {|n, i| draw_icon(n, x + 24 * i, y) }
- end
- def draw_basic_area(rect, actor)
- draw_actor_name(actor, rect.x - 7, rect.y, 100)
- draw_actor_icons(actor, rect.x + 59 , rect.y, 24)
- end
- def spacing
- return 4
- end
- def draw_actor_hp(actor, x, y, width = 124)
- draw_gauge(x+60, y, width-15, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
- change_color(system_color)
- draw_text(x+55, y, 30, line_height, Vocab::hp_a)
- draw_current_and_max_values(x+45, y, width, actor.hp, actor.mhp,
- hp_color(actor), normal_color)
- end
- def draw_actor_mp(actor, x, y, width = 124)
- draw_gauge(x+42, y, width-15, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
- change_color(system_color)
- draw_text(x+38, y, 30, line_height, Vocab::mp_a)
- draw_current_and_max_values(x+25, y, width, actor.mp, actor.mmp,
- mp_color(actor), normal_color)
- end
- def draw_actor_tp(actor, x, y, width = 124)
- draw_gauge(x+25, y, width-20, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
- change_color(system_color)
- draw_text(x+20, y, 30, line_height, Vocab::tp_a)
- change_color(tp_color(actor))
- draw_text(x + width - 37, y, 42, line_height, actor.tp.to_i, 2)
- end
- end
复制代码
|
-
|