Advertisement
FlipelyFlip

▽△▽ XRXSv12. Ds-In3. Lv Meter ▽△▽ VXA

Feb 20th, 2013
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.34 KB | None | 0 0
  1. # ▽△▽ XRXSv12. Ds-In3. Lv Meter ▽△▽
  2. #
  3. # publish 2010/ 3/15
  4. # update  - 11/ 1/ 6
  5. # Original by Chisaii Honya (http://xrxs.at-ninja.jp/Nov12.htm)
  6. # Translation: Zak (www.rpgmaker-reloaded.de)
  7. #
  8. #==============================================================================
  9. # カスタマイズポイント
  10. #==============================================================================
  11. module XRXSVDsIn3
  12.   Width  = 80  # Width (till' 52~)
  13.   Color1 = 20  # Transition Colour #1
  14.   Color2 = 21  # Transition Colour #2
  15. end
  16. #==============================================================================
  17. # デザイン・プラグイン
  18. #==============================================================================
  19. class Window_Base < Window
  20.   #--------------------------------------------------------------------------
  21.   # ● レベルの描画 [再定義]
  22.   #--------------------------------------------------------------------------
  23.   def draw_actor_level(actor, x, y)
  24.     self.contents.font.color = system_color
  25.     self.contents.draw_text(x, y, 32, WLH, Vocab::level_a)
  26.     self.contents.font.color = normal_color
  27.     self.contents.draw_text(x + 32, y, w - 32, WLH, actor.level, 2)
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # EXP ゲージの描画
  31.   #--------------------------------------------------------------------------
  32.   def draw_actor_exp_gauge(actor, x, y, width = 120)
  33.     gc1 = text_color(XRXSVDsIn3::Color1)
  34.     gc2 = text_color(XRXSVDsIn3::Color2)
  35.     draw_gauge(x, y, width, actor.exp_percent, gc1, gc2)
  36.   end
  37.   #--------------------------------------------------------------------------
  38.   # * Draw Level
  39.   #--------------------------------------------------------------------------
  40.   def draw_actor_level(actor, x, y)
  41.     draw_actor_exp_gauge(actor, x, y, XRXSVDsIn3::Width)
  42.     change_color(system_color)
  43.     draw_text(x, y, 32, line_height, Vocab::level_a)
  44.     change_color(normal_color)
  45.     draw_text(x + 32, y, 24, line_height, actor.level, 2)
  46.   end
  47. end
  48.  
  49. #==============================================================================
  50. # 現在EXPパーセントの取得
  51. #==============================================================================
  52. class Game_Actor < Game_Battler
  53.   def exp_percent
  54.     return self.exp * 100 / self.next_level_exp
  55.   end
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement