| 赞 | 12 |
| VIP | |
| 好人卡 | |
| 积分 | 157 |
| 经验 | |
| 最后登录 | 2026-4-24 |
| 在线时间 | 1849 小时 |
- 梦石
- 10
- 星屑
- 5748
- 在线时间
- 1849 小时
- 注册时间
- 2013-2-14
- 回帖
- 327

|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
问题是 我想在选项时,在右下角显示对应的角色半身像,我已经把战斗选项给固定在了右下角。
我是在默认系统上改的,改动如下,可效果不好。有谁能教下我吗?
[pre lang="ruby" line="1"]#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
# 显示战斗画面同伴状态的窗口。
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 320, 640, 160)
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
@level_up_flags = [false, false, false, false]
refresh
end
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
super
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
lihui = Sprite.new # 新生成一个 Sprite 类的实例
lihui.bitmap = Bitmap.new("Graphics/Pictures/"+i.to_s) # 是读取文件夹中所含的图片文件
lihui.x = 500 #设置x坐标
lihui.y = 200 #设置y坐标
actor = $game_party.actors
actor_x = i * 160 + 4
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
if @level_up_flags
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 96)
end
end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
# 主界面的不透明度下降
if $game_temp.battle_main_phase
self.contents_opacity -= 4 if self.contents_opacity > 191
else
self.contents_opacity += 4 if self.contents_opacity < 255
Graphics.update#新加
end
end
end
[/pre]
然后现在情况是选项时没显示图片。
然后全部选择好后,图片一口气全出来了。
请大大们指点。。 |
|