赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 18684 |
最后登录 | 2020-5-5 |
在线时间 | 9 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 60
- 在线时间
- 9 小时
- 注册时间
- 2006-9-7
- 帖子
- 303
|
正好我也需要,所以刚才试着修改了一下,成功了.
- #==============================================================================
- # ■ Window_BattleStatus
- #------------------------------------------------------------------------------
- # 显示战斗画面同伴状态的窗口。
- #==============================================================================
- class Window_BattleStatus < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(width - 32, height - 32)
- @level_up_flags = [false, false, false, false]
-
- self.opacity = 0
- @sta_back = []
- @sta_output = []
-
- @hp_bitmap = RPG::Cache.picture("HP_Meter.png")
- @mp_bitmap = RPG::Cache.picture("SP_Meter.png")
-
- @exp_bitmap = RPG::Cache.picture("Exp_Meter.png")
-
- # @xy_window = Window_xy.new
- # @xy_window.x = -16
- # @xy_window.y = -16
- # @xy_window.opacity = 0
- # @xy_window.back_opacity = 0
- # @xy_window.contents_opacity = 255
-
- for actor_index in 1..$game_party.actors.size
- @sta_back[actor_index] = Sprite.new
- @sta_back[actor_index].bitmap = Bitmap.new("Graphics/Pictures/" + $game_party.actors[actor_index - 1].name + "战斗.png")
- @sta_back[actor_index].x = 510-(actor_index - 1) * 130
- @sta_back[actor_index].y = 0
- @sta_back[actor_index].z = self.z + 1
- @sta_output[actor_index] = Sprite.new
- @sta_output[actor_index].bitmap = Bitmap.new(180, 120)
- @sta_output[actor_index].x = 476-(actor_index - 1) * 130
- @sta_output[actor_index].y = -29 #(actor_index - 1) * 80 - 29
- @sta_output[actor_index].z = self.z + 200
- @sta_output[actor_index].bitmap.clear
- @sta_output[actor_index].bitmap.font.size = 10
- @sta_output[actor_index].bitmap.font.name = "黑体"
-
- exp_width = $game_party.actors[actor_index - 1].now_exp * @exp_bitmap.width/$game_party.actors[actor_index - 1].next_exp
- exp_rect = Rect.new(0, 0, exp_width, 12)
-
- hp_width = $game_party.actors[actor_index - 1].hp * @hp_bitmap.width/$game_party.actors[actor_index - 1].maxhp
- hp_rect = Rect.new(0, 0, hp_width, 12)
-
- mp_width = $game_party.actors[actor_index - 1].sp * @mp_bitmap.width/$game_party.actors[actor_index - 1].maxsp
- mp_rect = Rect.new(0, 0, mp_width, 12)
-
- end
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 释放
- #--------------------------------------------------------------------------
- def dispose
- super
- for actor_index in 1..$game_party.actors.size
- @sta_back[actor_index].bitmap.dispose
- @sta_back[actor_index].dispose
- @sta_output[actor_index].bitmap.dispose
- @sta_output[actor_index].dispose
- end
- end
- #--------------------------------------------------------------------------
- # ● 设置升级标志
- # actor_index : 角色索引
- #--------------------------------------------------------------------------
- def level_up(actor_index)
- @level_up_flags[actor_index] = true
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- actor = $game_party.actors[i]
- #......................................................................
- actor_x = 480#i * 160 + 145
- actor_y = 0#i * 80 + 220
- @sta_output[i + 1].bitmap.clear
-
- exp_width = $game_party.actors[i].now_exp * @exp_bitmap.width/$game_party.actors[i].next_exp
- exp_rect = Rect.new(0, 0, exp_width, 12)
-
- hp_width = $game_party.actors[i].hp * @hp_bitmap.width/$game_party.actors[i].maxhp
- hp_rect = Rect.new(0, 0, hp_width, 12)
-
- mp_width = $game_party.actors[i].sp * @mp_bitmap.width/$game_party.actors[i].maxsp
- mp_rect = Rect.new(0, 0, mp_width, 12)
-
- @sta_output[i + 1].bitmap.blt(80, 44, @hp_bitmap, hp_rect)
- #间距
- @sta_output[i + 1].bitmap.blt(80, 56, @mp_bitmap, mp_rect)
-
- @sta_output[i + 1].bitmap.blt(80, 32, @exp_bitmap, exp_rect)
-
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- super
- # 主界面的不透明度下降
- if $game_temp.battle_main_phase
- self.contents_opacity = 255 #if self.contents_opacity > 1
- else
- self.contents_opacity = 255 #if self.contents_opacity < 255
- end
- end
- end
- ##############
- # Game_Actor #
- ##############
- class Game_Actor < Game_Battler
- def now_exp
- return @exp - @exp_list[@level]
- end
- def next_exp
- return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
- end
- end
复制代码 系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|