赞 | 1 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 9196 |
最后登录 | 2023-11-25 |
在线时间 | 141 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 147
- 在线时间
- 141 小时
- 注册时间
- 2011-6-1
- 帖子
- 343
|
楼主 |
发表于 2012-12-15 22:32:32
|
显示全部楼层
本帖最后由 乐之魂 于 2012-12-15 22:34 编辑
凌空飘雪 发表于 2012-12-9 08:35
你改的地方没错,但你注释掉行走图后,没加上描绘头像,所以就两个都没显示(原来关于描写头像的语句被覆盖 ...
找到
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 显示菜单画面和同伴状态的窗口。
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化目标
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 116
actor = $game_party.actors
#--刚加入self,bitmap,src这3行为半身像显示
testname=actor.id.to_s + "_f"
bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
self.contents.blt(0, y, bitmap, src_rect)
draw_actor_name(actor, x+60, y)
draw_actor_class(actor, x + 194, y)
draw_actor_level(actor, x+60, y + 32)
draw_actor_state(actor, x + 140, y + 32)
draw_actor_exp(actor, x+60, y + 64)
draw_actor_hp(actor, x + 236, y + 32)
draw_actor_sp(actor, x + 236, y + 64)
end
end
#--------------------------------------------------------------------------
# ● 刷新光标矩形
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
然后把 testname=actor.id.to_s + "_f"
bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
self.contents.blt(0, y, bitmap, src_rect)
复制到人物扩张脚本里
就是在刚才注释修改的地方下发添加
def refresh
self.contents.clear
@item_max = $game_party.actors.size
@column_max = 2
y = (FRONT_MEMBER_LIMIT+1)/2 * 64 + 28
self.contents.font.size = 16
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 92, 28, "战斗人数")
self.contents.draw_text(4, y, 92, 28, "待机人数")
for i in 0...$game_party.actors.size
x = 64 + i%2 * 224
y = i/2 * 72 + 24
actor = $game_party.actors
if i >= FRONT_MEMBER_LIMIT
y += 32
self.contents.font.color = disabled_color
self.contents.draw_text(x, y, 120, 32, actor.name)
else
draw_actor_name(actor , x , y )
end
#draw_actor_graphic(actor, x - 40, y + 64)
testname=actor.id.to_s + "_f"
bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
self.contents.blt(0, y, bitmap, src_rect)
unless NO_PARAMETER_ACTORS.include?(actor.id)
draw_actor_level(actor , x + 94, y )
draw_actor_hp(actor , x, y + 16)
draw_actor_sp(actor , x, y + 32)
draw_actor_state(actor , x, y + 48)
end
end
end
完毕,但到了游戏里,却坐标不对啊,如上图,右边的角色头像坐标跟坐标重合了……下面估计也整合到上面来了,该怎么改? |
|