Project1
标题:
问下关于显示的MISS和会心以及升级
[打印本页]
作者:
片羽樱
时间:
2008-11-26 02:11
标题:
问下关于显示的MISS和会心以及升级
1.我想把显示的MISS和CRITICAL文字改成中文的“未命中”和“会心一击”。后者不知在哪里改,前者在battler3里直接改字符串后没法显示文字。有无解决办法。
2.再问个,如何设置人物升级时HP、SP完全恢复 [LINE]1,#dddddd[/LINE]
版务信息:本贴由楼主自主结贴~
作者:
asperta
时间:
2008-11-26 02:33
升级补血
http://rpg.blue/web/htm/news149.htm
修改CRITICAL
module RPG
class Sprite < ::Sprite
def damage(value, critical)
dispose_damage
if value.is_a?(Numeric)
damage_string = value.abs.to_s
else
damage_string = value.to_s
end
bitmap = Bitmap.new(160, 48)
bitmap.font.name = "Arial Black"
bitmap.font.size = 32
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
if value.is_a?(Numeric) and value < 0
bitmap.font.color.set(176, 255, 144)
else
bitmap.font.color.set(255, 255, 255)
end
bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
if critical
bitmap.font.size = 20
bitmap.font.name = "黑体"
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, -1, 160, 20, "会心一击", 1)
bitmap.draw_text(+1, -1, 160, 20, "会心一击", 1)
bitmap.draw_text(-1, +1, 160, 20, "会心一击", 1)
bitmap.draw_text(+1, +1, 160, 20, "会心一击", 1)
bitmap.font.color.set(255, 255, 255)
bitmap.draw_text(0, 0, 160, 20, "会心一击", 1)
end
@_damage_sprite = ::Sprite.new(self.viewport)
@_damage_sprite.bitmap = bitmap
@_damage_sprite.ox = 80
@_damage_sprite.oy = 20
@_damage_sprite.x = self.x
@_damage_sprite.y = self.y - self.oy / 2
@_damage_sprite.z = 3000
@_damage_duration = 40
end
end
end
复制代码
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1