Advertisement
Spoofus

Untitled

Aug 5th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. class Window_BattleStatus < Window_Base
  2. #--------------------------------------------------------------------------
  3. # * Object Initialization
  4. #--------------------------------------------------------------------------
  5. def initialize
  6. super(450, 270, 190, 210)
  7. self.contents = Bitmap.new(width - 32, height - 32)
  8. self.contents.font.size = 14
  9. self.back_opacity = $game_system.window_opacity #**
  10. self.contents.font.bold = true
  11. self.contents.font.name = "Tahoma"
  12. @level_up_flags = [false, false, false, false]
  13. refresh
  14. end
  15. #--------------------------------------------------------------------------
  16. # * Dispose
  17. #--------------------------------------------------------------------------
  18. def dispose
  19. super
  20. end
  21. #--------------------------------------------------------------------------
  22. # * Set Level Up Flag
  23. # actor_index : actor index
  24. #--------------------------------------------------------------------------
  25. def level_up(actor_index)
  26. @level_up_flags[actor_index] = true
  27. end
  28. #--------------------------------------------------------------------------
  29. # * Refresh
  30. #--------------------------------------------------------------------------
  31. def refresh
  32. self.contents.clear
  33. @item_max = $game_party.actors.size
  34. for i in 0...$game_party.actors.size
  35. actor = $game_party.actors[i]
  36. actor_y = i * 82 + 0
  37. draw_actor_name(actor, 47, actor_y + 4)
  38. draw_actor_hp(actor, 45, actor_y + 20, 100)
  39. draw_actor_sp(actor, 61, actor_y + 45, 100)
  40. draw_face(actor, 120, actor_y + 27)
  41. if @level_up_flags[i]
  42. self.contents.font.color = normal_color
  43. self.contents.draw_text(150, actor_y, 120, 32, "LEVEL UP!")
  44. else
  45. draw_actor_state(actor, 215, actor_y)
  46. end
  47. end
  48. end
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement