Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- #** NS
- #==============================================================================
- class NS;
- end #NS
- #==============================================================================
- # ** NS::Battle_Plane
- #==============================================================================
- class NS::Battle_Plane
- # Switch to Enable Scrolling Background
- Enable_Switch = 15
- # Variables for Horizontal and Vertical Scroll Speed
- Back1_X_Variable = 10
- Back1_Y_Variable = 11
- Back2_X_Variable = 12
- Back2_Y_Variable = 13
- end # NS::Battle_Plane
- #==============================================================================
- #** Spriteset_Battle
- #==============================================================================
- class Spriteset_Battle
- #--------------------------------------------------------------------------
- #* Create Battle Background (Floor) Sprite
- #--------------------------------------------------------------------------
- unless method_defined?(:battleback_C42W53GD_sb_create_battleback1)
- alias_method(:battleback_C42W53GD_sb_create_battleback1, :create_battleback1)
- end
- def create_battleback1(*args, &block)
- if $game_switches[NS::Battle_Plane::Enable_Switch] == true
- @back1_sprite = Plane.new(@viewport1)
- @back1_sprite.bitmap = battleback1_bitmap
- @back1_sprite.z = 0 @back1_sprite_ox = 0
- @back1_sprite_oy = 0
- else
- battleback_C42W53GD_sb_create_battleback1(*args, &block)
- end
- end
- #--------------------------------------------------------------------------
- # * Create Battle Background (Wall) Sprite
- #--------------------------------------------------------------------------
- unless method_defined?(:battleback_ms67JgWE_sb_create_battleback2)
- alias_method(:battleback_ms67JgWE_sb_create_battleback2, :create_battleback2)
- end
- def create_battleback2(*args, &block)
- if $game_switches[NS::Battle_Plane::Enable_Switch] == true
- @back2_sprite = Plane.new(@viewport1)
- @back2_sprite.bitmap = battleback2_bitmap
- @back2_sprite.z = 1 @back2_sprite_ox = 0
- @back2_sprite_oy = 0
- else
- battleback_ms67JgWE_sb_create_battleback2(*args, &block)
- end
- end
- #--------------------------------------------------------------------------
- #* Update Battle Background (Floor) Sprite
- #--------------------------------------------------------------------------
- unless method_defined?(:battleback_HNirC0QE_sb_update_battleback1)
- alias_method(:battleback_HNirC0QE_sb_update_battleback1, :update_battleback1)
- end
- def update_battleback1(*args, &block)
- if $game_switches[NS::Battle_Plane::Enable_Switch] == true
- @back1_sprite_ox += $game_variables[NS::Battle_Plane::Back1_X_Variable].to_f / 64
- @back1_sprite_oy += $game_variables[NS::Battle_Plane::Back1_Y_Variable].to_f / 64
- @back1_sprite.ox = @back1_sprite_ox * 16 @back1_sprite.oy = @back1_sprite_oy * 16
- else
- battleback_HNirC0QE_sb_update_battleback1(*args, &block)
- end
- end
- #--------------------------------------------------------------------------
- # * Update Battle Background (Wall) Sprite
- #--------------------------------------------------------------------------
- unless method_defined?(:battleback_zmrQkMCU_sb_update_battleback2)
- alias_method(:battleback_zmrQkMCU_sb_update_battleback2, :update_battleback2)
- end
- def update_battleback2(*args, &block)
- if $game_switches[NS::Battle_Plane::Enable_Switch] == true
- @back2_sprite_ox += $game_variables[NS::Battle_Plane::Back2_X_Variable].to_f / 64
- @back2_sprite_oy += $game_variables[NS::Battle_Plane::Back2_Y_Variable].to_f / 64
- @back2_sprite.ox = @back2_sprite_ox * 16 @back2_sprite.oy = @back2_sprite_oy * 16
- else
- battleback_zmrQkMCU_sb_update_battleback2(*args, &block)
- end
- end
- end # Spriteset_Battle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement