Advertisement
AngryPacman

[VXA] Whiten Enemy

Mar 12th, 2012
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.61 KB | None | 0 0
  1. module WHITEN_ENEMY
  2.   FLICKER = true
  3.   FLICKER_RATE = 45
  4. end
  5.  
  6. class Window_BattleEnemy < Window_Selectable
  7.   def update
  8.     super
  9.     return unless active
  10.     type = :whiten
  11.     if WHITEN_ENEMY::FLICKER
  12.       @last_sprite_effect_type = enemy.sprite_effect_type
  13.       @change_counter = 0 if @change_counter.nil? or @change_counter >
  14.        WHITEN_ENEMY::FLICKER_RATE
  15.       @change = @change_counter > (WHITEN_ENEMY::FLICKER_RATE / 2)
  16.       type = @last_sprite_effect_type
  17.       type = :whiten if @change
  18.     end
  19.     enemy.sprite_effect_type = type
  20.     @change_counter += 1 if WHITEN_ENEMY::FLICKER
  21.   end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement