if @character.name == "敌人,1,1500,1500"
name = "敌人,1,1500,1500"
data = name.split(/,/) #装载数据
if @hp != data[2] or
@maxhp != data[3]
@hp = data[2]
@maxhp = data[3]
hp = HPSP血条长度/(data[3].to_f/data[2].to_f)
@sprite.bitmap.clear
@sprite.bitmap.fill_rect(100,100, hp, 2, Color.new(255, 0, 51))
end
end
if @character.name == "敌人,2,500,500"
name = "敌人,2,500,500"
data = name.split(/,/) #装载数据
if @hp != data[2] or
@maxhp != data[3]
@hp = data[2]
@maxhp = data[3]
hp = HPSP血条长度/(data[3].to_f/data[2].to_f)
@sprite.bitmap.clear
@sprite.bitmap.fill_rect(100,100, hp, 2, Color.new(255, 0, 51))
end
end作者: longhun9958 时间: 2009-6-6 00:20
提示: 作者被禁止或删除 内容自动屏蔽作者: stella 时间: 2009-6-6 19:23
顶一下