Project1
标题:
怎么改战斗中显示的名字的颜色!
[打印本页]
作者:
无泪
时间:
2007-12-18 02:38
提示:
作者被禁止或删除 内容自动屏蔽
作者:
无泪
时间:
2007-12-18 02:38
提示:
作者被禁止或删除 内容自动屏蔽
作者:
英俊de狗
时间:
2007-12-18 03:44
提示:
作者被禁止或删除 内容自动屏蔽
作者:
诡异の猫
时间:
2007-12-18 03:51
#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
# 显示战斗画面同伴状态的窗口。
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 320, 640, 160)
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 draw_actor_name_new(actor, x, y)
self.contents.font.color = text_color(2) # 括号内参数可修改(1-7)
self.contents.draw_text(x, y, 120, 32, actor.name)
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 = i * 160 + 4
draw_actor_name_new(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
if @level_up_flags[i]
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
end
end
end
复制代码
打开脚本编辑器.
找到Window_BattleStatus脚本
复制以上脚本
把Window_BattleStatus全部覆盖掉
脚本中第34行
self.contents.font.color = text_color(2) # 括号内参数可修改(1-7)
text_color(2)
这个东西括号中的数字可以从1-7随便改.
代表不同颜色 [LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者:
q2571855
时间:
2007-12-18 06:35
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1