Advertisement
Guest User

Scene_Map 2

a guest
Apr 3rd, 2020
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.25 KB | None | 0 0
  1. #==============================================================================
  2.  
  3. # * Scene_Map
  4.  
  5. #------------------------------------------------------------------------------
  6.  
  7. #  It is the class which processes the map picture.
  8.  
  9. #==============================================================================
  10.  
  11. class Scene_Map
  12.  
  13.   #--------------------------------------------------------------------------
  14.  
  15.   # - Draw HP Window
  16.  
  17.   #--------------------------------------------------------------------------
  18.  
  19.   def draw_hp
  20.  
  21.     # Draw HP Window
  22.  
  23.    
  24.  
  25.     @hp_window = Window_Sta.new
  26.  
  27.     @hp_window.back_opacity = 160
  28.  
  29.     @viewport_bor= Viewport.new(91, 26, 55, 32)
  30.  
  31.     @viewport_bor.z = 220
  32.  
  33.     @hp_slide = Plane.new(@viewport_bor)
  34.  
  35.     @hp_slide.bitmap = RPG::Cache.title("life")
  36.  
  37.     @hp_bor = Sprite.new(@viewport_bor)
  38.  
  39.     @hp_bor.bitmap = RPG::Cache.title("life_bor")
  40.  
  41.     @hp_bor.z = 240
  42.  
  43.   end
  44.  
  45.   #--------------------------------------------------------------------------
  46.  
  47.   # - Dispose HP Window
  48.  
  49.   #--------------------------------------------------------------------------
  50.  
  51.   def dispose_hp
  52.  
  53.     @hp_window.dispose
  54.  
  55.     @viewport_bor.dispose
  56.  
  57.     @hp_slide.dispose
  58.  
  59.     @hp_bor.dispose
  60.  
  61.   end
  62.  
  63.   #--------------------------------------------------------------------------
  64.  
  65.   # - Refresh Windows
  66.  
  67.   #--------------------------------------------------------------------------
  68.  
  69.   def re_window
  70.  
  71.     @hp_window.refresh
  72.  
  73.   end
  74.  
  75.   #--------------------------------------------------------------------------
  76.  
  77.   # - Refresh Windows
  78.  
  79.   #--------------------------------------------------------------------------
  80.  
  81.   def re_window_2
  82.  
  83.     @hp_window.visible = true
  84.  
  85.     @hp_slide.visible = true
  86.  
  87.     @hp_bor.visible = true
  88.  
  89.   end
  90.  
  91.   #--------------------------------------------------------------------------
  92.  
  93.   # - Hide HUD
  94.  
  95.   #--------------------------------------------------------------------------
  96.  
  97.   def hide_hud
  98.  
  99.     if $game_switches[50] == false
  100.  
  101.       @hp_window.visible = true
  102.  
  103.       @hp_slide.visible = true
  104.  
  105.       @hp_bor.visible = true
  106.  
  107.     else
  108.  
  109.       @hp_window.visible = false
  110.  
  111.       @hp_slide.visible = false
  112.  
  113.       @hp_bor.visible = false
  114.  
  115.     end
  116.  
  117.   end
  118.  
  119. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement