#================================================= # ¡á Window_Gauge (»ç¿ë ¹æ¹ý Á¤ÀÇ) #------------------------------------------------- # ¡¡Author: Bimilist(ºñ¹Ð¼Ò³â) # ¼öÁ¤ : ÄÚ½ºÆ¬ # Modifier: ÆдÐ(kcss, kcsspanic) # ¡¡Desc: ¿øº»Àº °æÇèÄ¡Ç¥½Ã # HP, SP, °æÇèÄ¡(¼Ò¼öÁ¡3ÀçÂ¥¸® ±îÁö) Ç¥Çö #================================================= class Game_Actor < Game_Battler def exp_rate if @exp_list[@level+1] - @exp_list[@level] > 0 return (@exp - @exp_list[@level]).to_f / (@exp_list[@level+1] - @exp_list[@level]).to_f else return 0 end end end class Window_Gauge < Window_Base def initialize super(0, 330, 180, 150) # ( XÁÂÇ¥,YÁÂÇ¥,°¡·Î±æÀÌ,¼¼·Î±æÀÌ) ¿µ¹®ÆÇ°ú ¼öÄ¡°¡ ´Ù¸§(ÇÑ±Û ÆùÆ® Å©±â¿¡ ÀÇÇؼ­) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font = Font.new("±¼¸²", 16) # <- font, size self.opacity = 180 self.back_opacity = 180 end def refresh self.contents.clear self.contents.draw_text(0, -5, 120, 30, @show_text6) self.contents.draw_text(0, 14, 120, 30, @show_text7) self.contents.draw_text(0, 33, 120, 30, @show_text5) self.contents.draw_text(0, 52, 120, 30, @show_text) self.contents.draw_text(0, 71, 120, 30, @show_text2) self.contents.draw_text(0, 90, 120, 30, @show_text3) self.contents.draw_text(0, 109, 120, 30, @show_text4) end def actor $game_party.actors[0] # <- ÆÄƼ 0¹ø° end def update super text = sprintf("ü·Â : %d / %d", actor.hp, actor.maxhp) text2 = sprintf("¸¶³ª : %d / %d", actor.sp, actor.maxsp) text3 = sprintf("°æÇèÄ¡ : %.3f%%", (actor.exp_rate*100).to_f) text4 = sprintf("¼ÒÁö±Ý : %d G",$game_party.gold) text5 = sprintf("·¹º§ : %d", actor.level) text6 = sprintf("Á÷¾÷ : %s", $game_party.actors[0].class_name) text7 = sprintf("ij¸¯ÅÍ : %s", actor.name) if @show_text != text or @show_text2 != text2 or @show_text3 != text3 or @show_text4 != text4 or @show_text5 != text5 or @show_text6 != text6 or @show_tex7 != text7 @show_text = text @show_text2 = text2 @show_text3 = text3 @show_text4 = text4 @show_text5 = text5 @show_text6 = text6 @show_text7 = text7 refresh end end end class Scene_Map alias update_before_map update def update update_before_map @window_gauge = Window_Gauge.new unless @window_gauge @window_gauge.update unless $scene.is_a?(Scene_Map) @window_gauge.dispose @window_gauge = nil end end end