Advertisement
kurashi

BattleFog Add-on For the Fog Script

May 8th, 2015
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.87 KB | None | 0 0
  1. class Scene_Battle < Scene_Base
  2.   alias kurashi_title_fog_addon start
  3.   def start
  4.     kurashi_title_fog_addon
  5.     create_fog
  6.   end
  7.   def create_fog
  8.     @fog = Plane.new
  9.     @fog.bitmap = Cache.fog(PPVXAce_General_Configs::Fog_Filename)
  10.     @fog.z = 3
  11.     @fog.opacity = PPVXAce_General_Configs::Fog_Opacity
  12.     @fog.bitmap.hue_change(PPVXAce_General_Configs::Fog_Hue)
  13.   end
  14.   def update
  15.     super
  16.     update_fog
  17.     if BattleManager.in_turn?
  18.       process_event
  19.       process_action
  20.     end
  21.     BattleManager.judge_win_loss
  22.   end
  23.   def update_for_wait
  24.     update_fog
  25.     update_basic
  26.   end
  27.   def update_fog
  28.     @fog.ox += PPVXAce_General_Configs::Fog_SpeedX
  29.     @fog.oy += PPVXAce_General_Configs::Fog_SpeedY
  30.   end
  31.   def terminate
  32.     super
  33.     dispose_spriteset
  34.     @fog.bitmap.dispose
  35.     @fog.dispose
  36.     @info_viewport.dispose
  37.     RPG::ME.stop
  38.   end
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement