Project1
标题:
到底是怎么回事啊
[打印本页]
作者:
825300455
时间:
2012-8-1 20:01
标题:
到底是怎么回事啊
我上次照猫画虎用了某侠的血槽脚本,结果写到这里,又说我倒数第二行有错误,好吧我就删了最后一个end,他又说我68行的有问题,反正我删一行就说我倒数第二行语法错误,高手帮我看看啊,好烦啊!
#==============================================================================
# ■ 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 refresh
@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(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
# 处理HPBar
self.contents.clear
self.contents.fill_rect(0,10,160,20,Color.new(11,11,11,255))
self.contents.fill_rect(2,12,155,15,Color.new(255,100,100,255))
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
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[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
复制代码
‘‘──825300455于2012-8-1 20:02补充以下内容:
end到底哪里出问题了{:4_147:}
’’ dsu_plus_rewardpost_czw
作者:
明特·布兰马修
时间:
2012-8-1 21:30
目测是少了一个end
在最后一行那添加一个end试试吧
作者:
825300455
时间:
2012-8-1 23:13
那就四个end了不会出问题吧,我试试
作者:
825300455
时间:
2012-8-2 00:21
虽然也不是多不多end的问题,但我在end下面空出几行就可以了,不过还是谢谢你。
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1