Module: PSP
- Defined in:
- scripts/01600 Alpha 25 Battle Engine/99999 Pokemon_Script_Project/00200 Scene_Battle___PSP_add.rb
Overview
noyard
Constant Summary collapse
- MOVE_TO_ID_ANIMATION_TARGET =
load_data("Data/PSP_MTAT.dat")
- MOVE_TO_ID_ANIMATION_USER =
load_data("Data/PSP_MTAU.dat")
Class Method Summary collapse
-
.animation(src_sprite, id, reverse = false)
reverse = true if src_sprite = enemy.
- .dispose_sprite
- .make_sprite(viewport = nil)
- .move_animation(usr_sprite, trg_sprite, move_id, reverse = false)
Class Method Details
.animation(src_sprite, id, reverse = false)
reverse = true if src_sprite = enemy
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'scripts/01600 Alpha 25 Battle Engine/99999 Pokemon_Script_Project/00200 Scene_Battle___PSP_add.rb', line 16 def animation(src_sprite, id, reverse = false) # reverse = true if src_sprite = enemy (sp = @main_sprite).x = src_sprite.x# * $zoom_factor sp.y = src_sprite.y #* $zoom_factor sp.z = src_sprite.z sp.ox = src_sprite.ox sp.oy = src_sprite.oy sp.bitmap = src_sprite.bitmap sp.zoom_x = sp.zoom_y = src_sprite.zoom_x#$zoom_factor * src_sprite.zoom_x visible = src_sprite.visible src_sprite.visible = false animation = $data_animations[id] if animation sp.register_position sp.animation(animation, true, reverse) while sp.effect? sp.update sp..need_to_sort = true sp..sort_z Graphics.update Graphics.update if Graphics.frame_count % 3 == 0 end sp.reset_position sp.update Graphics.update end sp&.&.color&.set(0, 0, 0, 0) # Fix flash src_sprite.visible = visible sp.bitmap = nil end |
.dispose_sprite
10 11 12 13 14 |
# File 'scripts/01600 Alpha 25 Battle Engine/99999 Pokemon_Script_Project/00200 Scene_Battle___PSP_add.rb', line 10 def dispose_sprite return unless @main_sprite @main_sprite.dispose @main_sprite = nil end |
.make_sprite(viewport = nil)
6 7 8 |
# File 'scripts/01600 Alpha 25 Battle Engine/99999 Pokemon_Script_Project/00200 Scene_Battle___PSP_add.rb', line 6 def make_sprite( = nil) @main_sprite = ::RPG::Sprite.new() end |
.move_animation(usr_sprite, trg_sprite, move_id, reverse = false)
46 47 48 49 50 51 |
# File 'scripts/01600 Alpha 25 Battle Engine/99999 Pokemon_Script_Project/00200 Scene_Battle___PSP_add.rb', line 46 def move_animation(usr_sprite, trg_sprite, move_id, reverse = false) id = MOVE_TO_ID_ANIMATION_USER[move_id] animation(usr_sprite, id, reverse) if id id = MOVE_TO_ID_ANIMATION_TARGET[move_id] animation(trg_sprite, id, reverse) if id end |