Class: BattleUI::PokemonSprite
- Inherits:
-
ShaderedSprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- ShaderedSprite
- BattleUI::PokemonSprite
- Includes:
- GoingInOut, MultiplePosition, Shader::CreatureShaderLoader
- Defined in:
- docs/5_Battle_01_Scene.rb
Overview
Sprite of a Pokemon in the battle
Direct Known Subclasses
Constant Summary collapse
- DELTA_DEATH_Y =
Constant giving the deat Delta Y (you need to adjust that so your screen animation are OK when Pokemon are KO)
32- STATUS_SE =
Sound effect corresponding to the status
{poison: 'moves/poison', toxic: 'moves/poison', confusion: 'moves/confusion', sleep: 'moves/asleep', freeze: 'moves/freeze', paralysis: 'moves/paralysis', burn: 'moves/burn', attract: 'moves/attract'}
- STATUS_TONE =
Tone according to the status
{neutral: [0, 0, 0, 0, 0], poison: [0.4, 0, 0.49, 0.6, 0], toxic: [0.4, 0, 0.49, 0.6, 0], freeze: [0.23, 0.56, 1, 0.6, 0.6], paralysis: [0.39, 0.47, 0, 0.6, 0], burn: [0.45, 0, 0, 0.8, 0], confusion: [0, 0, 0, 0, 0], sleep: [0, 0, 0, 0, 0], ko: [0, 0, 0, 0, 0], flinch: [0, 0, 0, 0, 0], attract: [0, 0, 0, 0, 0]}
Instance Attribute Summary collapse
-
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::AnimationMixin}
readonly
Get the animation handler.
-
#animation_tone ⇒ Yuki::TimedLoopAnimation
Get the animation linked to a status tone.
-
#bank ⇒ Integer
readonly
Get the bank of the pokemon shown by the sprite.
-
#pokemon ⇒ PFM::PokemonBattler
Get the Pokemon shown by the sprite.
-
#position ⇒ Integer
readonly
Get the position of the pokemon shown by the sprite.
-
#scene ⇒ Battle::Scene
readonly
Get the scene linked to this object.
-
#selected ⇒ Boolean
Tell if the sprite is currently selected.
-
#stop_gif_animation ⇒ Boolean
Stop the gif animation.
-
#stop_status_tone ⇒ Boolean
Stop the animation linked to the status tone.
-
#temporary_substitute_overwrite ⇒ Boolean
Tell if the sprite is temporary showed while in the Substitute state.
Attributes inherited from LiteRGSS::ShaderedSprite
Attributes inherited from LiteRGSS::Sprite
#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y
Instance Method Summary collapse
-
#bitmap=(bitmap)
Set the bitmap of the sprite.
-
#center_camera(use_position = true)
Move the camera to the battler sprite.
-
#change_stat_animation(amount)
Create a stat change animation.
-
#create_animation
Create the animation.
-
#cry(dying = false)
Play the cry of the Pokemon.
-
#done? ⇒ Boolean
Tell if the sprite animations are done.
-
#flee_animation ⇒ Yuki::AnimationMixin
Creates the flee animation.
-
#initialize(viewport, scene) ⇒ PokemonSprite
constructor
Create a new PokemonSprite.
-
#opacity=(opacity)
Set the opacity of the sprite.
-
#remove_tone_animation
remove tone animation.
-
#reset_tone_status
Reset the tone inflicted by the animation.
-
#set_origin(ox, oy) ⇒ self
Set the origin of the sprite & the shadow.
-
#set_position(x, y) ⇒ self
Set the position of the sprite.
-
#set_tone_status(status, switch = false)
Create a tone status animation.
-
#set_tone_to(red, green, blue, alpha)
Set a tone on the PokemonSprite.
-
#shiny_animation
Create a shiny animation.
-
#sprite_zoom ⇒ Integer
Pokemon sprite zoom.
-
#sprite_zoom_battle_animation ⇒ Integer
Pokemon sprite zoom used in battle animations.
-
#status_animation(status)
Create a status animation.
-
#substitute_animations_speed ⇒ Float
Return the Substitute animations speed.
-
#switch_from_substitute_animation
Creates the switch from substitute animation.
-
#switch_to_substitute_animation
Creates the switch to substitute animation.
-
#switch_to_substitute_sprite
Directly switch the PokemonSprite appearance to the substitute appearance.
-
#under_substitute_effect? ⇒ Boolean
Tell if the Pokemon represented by this sprite is under the effect of Substitute.
-
#update
Update the sprite.
-
#visible=(visible)
Set the visibility of the sprite.
-
#x=(x)
Set the x position of the sprite.
-
#y=(y)
Set the y position of the sprite.
-
#zoom=(zoom)
Set the zoom of the sprite.
-
#zoom_x=(zoom)
Set the zoom_x of the sprite.
-
#zoom_y=(zoom)
Set the zoom_y of the sprite.
Methods included from Shader::CreatureShaderLoader
#find_shader_id, #load_shader, #load_shader_properties
Methods included from MultiplePosition
Methods included from GoingInOut
Methods inherited from Sprite
#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(viewport, scene) ⇒ PokemonSprite
Create a new PokemonSprite
713 714 |
# File 'docs/5_Battle_01_Scene.rb', line 713 def initialize(, scene) end |
Instance Attribute Details
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::AnimationMixin} (readonly)
Get the animation handler
691 692 693 |
# File 'docs/5_Battle_01_Scene.rb', line 691 def animation_handler @animation_handler end |
#animation_tone ⇒ Yuki::TimedLoopAnimation
Get the animation linked to a status tone
703 704 705 |
# File 'docs/5_Battle_01_Scene.rb', line 703 def animation_tone @animation_tone end |
#bank ⇒ Integer (readonly)
Get the bank of the pokemon shown by the sprite
697 698 699 |
# File 'docs/5_Battle_01_Scene.rb', line 697 def bank @bank end |
#pokemon ⇒ PFM::PokemonBattler
Get the Pokemon shown by the sprite
688 689 690 |
# File 'docs/5_Battle_01_Scene.rb', line 688 def pokemon @pokemon end |
#position ⇒ Integer (readonly)
Get the position of the pokemon shown by the sprite
694 695 696 |
# File 'docs/5_Battle_01_Scene.rb', line 694 def position @position end |
#scene ⇒ Battle::Scene (readonly)
Get the scene linked to this object
700 701 702 |
# File 'docs/5_Battle_01_Scene.rb', line 700 def scene @scene end |
#selected ⇒ Boolean
Tell if the sprite is currently selected
682 683 684 |
# File 'docs/5_Battle_01_Scene.rb', line 682 def selected @selected end |
#stop_gif_animation ⇒ Boolean
Stop the gif animation
709 710 711 |
# File 'docs/5_Battle_01_Scene.rb', line 709 def stop_gif_animation @stop_gif_animation end |
#stop_status_tone ⇒ Boolean
Stop the animation linked to the status tone
706 707 708 |
# File 'docs/5_Battle_01_Scene.rb', line 706 def stop_status_tone @stop_status_tone end |
#temporary_substitute_overwrite ⇒ Boolean
Tell if the sprite is temporary showed while in the Substitute state
685 686 687 |
# File 'docs/5_Battle_01_Scene.rb', line 685 def temporary_substitute_overwrite @temporary_substitute_overwrite end |
Instance Method Details
#bitmap=(bitmap)
Set the bitmap of the sprite
771 772 |
# File 'docs/5_Battle_01_Scene.rb', line 771 def bitmap=(bitmap) end |
#center_camera(use_position = true)
can't send resolved parameter through Visual so PokemonSprite is used as an intermediary
Move the camera to the battler sprite
837 838 |
# File 'docs/5_Battle_01_Scene.rb', line 837 def center_camera(use_position = true) end |
#change_stat_animation(amount)
Create a stat change animation
800 801 |
# File 'docs/5_Battle_01_Scene.rb', line 800 def change_stat_animation(amount) end |
#create_animation
Create the animation
716 717 |
# File 'docs/5_Battle_01_Scene.rb', line 716 def create_animation end |
#cry(dying = false)
Play the cry of the Pokemon
731 732 |
# File 'docs/5_Battle_01_Scene.rb', line 731 def cry( = false) end |
#done? ⇒ Boolean
Tell if the sprite animations are done
723 724 |
# File 'docs/5_Battle_01_Scene.rb', line 723 def done? end |
#flee_animation ⇒ Yuki::AnimationMixin
Creates the flee animation
779 780 |
# File 'docs/5_Battle_01_Scene.rb', line 779 def flee_animation end |
#opacity=(opacity)
Set the opacity of the sprite
767 768 |
# File 'docs/5_Battle_01_Scene.rb', line 767 def opacity=(opacity) end |
#remove_tone_animation
remove tone animation
803 804 |
# File 'docs/5_Battle_01_Scene.rb', line 803 def remove_tone_animation end |
#reset_tone_status
Reset the tone inflicted by the animation
813 814 |
# File 'docs/5_Battle_01_Scene.rb', line 813 def reset_tone_status end |
#set_origin(ox, oy) ⇒ self
Set the origin of the sprite & the shadow
737 738 |
# File 'docs/5_Battle_01_Scene.rb', line 737 def set_origin(ox, oy) end |
#set_position(x, y) ⇒ self
Set the position of the sprite
755 756 |
# File 'docs/5_Battle_01_Scene.rb', line 755 def set_position(x, y) end |
#set_tone_status(status, switch = false)
Create a tone status animation
797 798 |
# File 'docs/5_Battle_01_Scene.rb', line 797 def set_tone_status(status, switch = false) end |
#set_tone_to(red, green, blue, alpha)
Set a tone on the PokemonSprite
810 811 |
# File 'docs/5_Battle_01_Scene.rb', line 810 def set_tone_to(red, green, blue, alpha) end |
#shiny_animation
Create a shiny animation
788 789 |
# File 'docs/5_Battle_01_Scene.rb', line 788 def shiny_animation end |
#sprite_zoom ⇒ Integer
Pokemon sprite zoom
828 829 |
# File 'docs/5_Battle_01_Scene.rb', line 828 def sprite_zoom end |
#sprite_zoom_battle_animation ⇒ Integer
Pokemon sprite zoom used in battle animations
832 833 |
# File 'docs/5_Battle_01_Scene.rb', line 832 def sprite_zoom_battle_animation end |
#status_animation(status)
Create a status animation
792 793 |
# File 'docs/5_Battle_01_Scene.rb', line 792 def status_animation(status) end |
#substitute_animations_speed ⇒ Float
Return the Substitute animations speed
824 825 |
# File 'docs/5_Battle_01_Scene.rb', line 824 def substitute_animations_speed end |
#switch_from_substitute_animation
Creates the switch from substitute animation
785 786 |
# File 'docs/5_Battle_01_Scene.rb', line 785 def switch_from_substitute_animation end |
#switch_to_substitute_animation
Creates the switch to substitute animation
782 783 |
# File 'docs/5_Battle_01_Scene.rb', line 782 def switch_to_substitute_animation end |
#switch_to_substitute_sprite
Directly switch the PokemonSprite appearance to the substitute appearance
820 821 |
# File 'docs/5_Battle_01_Scene.rb', line 820 def switch_to_substitute_sprite end |
#under_substitute_effect? ⇒ Boolean
Tell if the Pokemon represented by this sprite is under the effect of Substitute
817 818 |
# File 'docs/5_Battle_01_Scene.rb', line 817 def under_substitute_effect? end |
#update
Update the sprite
719 720 |
# File 'docs/5_Battle_01_Scene.rb', line 719 def update end |
#visible=(visible)
Set the visibility of the sprite
775 776 |
# File 'docs/5_Battle_01_Scene.rb', line 775 def visible=(visible) end |
#x=(x)
Set the x position of the sprite
763 764 |
# File 'docs/5_Battle_01_Scene.rb', line 763 def x=(x) end |
#y=(y)
Set the y position of the sprite
759 760 |
# File 'docs/5_Battle_01_Scene.rb', line 759 def y=(y) end |
#zoom=(zoom)
Set the zoom of the sprite
741 742 |
# File 'docs/5_Battle_01_Scene.rb', line 741 def zoom=(zoom) end |
#zoom_x=(zoom)
Set the zoom_x of the sprite
745 746 |
# File 'docs/5_Battle_01_Scene.rb', line 745 def zoom_x=(zoom) end |
#zoom_y=(zoom)
Set the zoom_y of the sprite
749 750 |
# File 'docs/5_Battle_01_Scene.rb', line 749 def zoom_y=(zoom) end |