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
Instance Attribute Summary collapse
-
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation}
readonly
Get the animation handler.
-
#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.
-
#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.
-
#cry(dying = false)
Play the cry of the Pokemon.
-
#done? ⇒ Boolean
Tell if the sprite animations are done.
-
#flee_animation ⇒ Yuki::Animation::TimedAnimation
Creates the flee animation.
-
#initialize(viewport, scene) ⇒ PokemonSprite
constructor
Create a new PokemonSprite.
-
#opacity=(opacity)
Set the opacity of the sprite.
-
#set_origin(ox, oy) ⇒ self
Set the origin of the sprite & the shadow.
-
#set_position(x, y) ⇒ self
Set the position of the sprite.
-
#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.
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::Sprite
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(viewport, scene) ⇒ PokemonSprite
Create a new PokemonSprite
585 586 |
# File 'docs/5_Battle_01_Scene.rb', line 585 def initialize(, scene) end |
Instance Attribute Details
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation} (readonly)
Get the animation handler
572 573 574 |
# File 'docs/5_Battle_01_Scene.rb', line 572 def animation_handler @animation_handler end |
#bank ⇒ Integer (readonly)
Get the bank of the pokemon shown by the sprite
578 579 580 |
# File 'docs/5_Battle_01_Scene.rb', line 578 def bank @bank end |
#pokemon ⇒ PFM::PokemonBattler
Get the Pokemon shown by the sprite
569 570 571 |
# File 'docs/5_Battle_01_Scene.rb', line 569 def pokemon @pokemon end |
#position ⇒ Integer (readonly)
Get the position of the pokemon shown by the sprite
575 576 577 |
# File 'docs/5_Battle_01_Scene.rb', line 575 def position @position end |
#scene ⇒ Battle::Scene (readonly)
Get the scene linked to this object
581 582 583 |
# File 'docs/5_Battle_01_Scene.rb', line 581 def scene @scene end |
#selected ⇒ Boolean
Tell if the sprite is currently selected
563 564 565 |
# File 'docs/5_Battle_01_Scene.rb', line 563 def selected @selected end |
#temporary_substitute_overwrite ⇒ Boolean
Tell if the sprite is temporary showed while in the Substitute state
566 567 568 |
# File 'docs/5_Battle_01_Scene.rb', line 566 def temporary_substitute_overwrite @temporary_substitute_overwrite end |
Instance Method Details
#bitmap=(bitmap)
Set the bitmap of the sprite
632 633 |
# File 'docs/5_Battle_01_Scene.rb', line 632 def bitmap=(bitmap) end |
#cry(dying = false)
Play the cry of the Pokemon
600 601 |
# File 'docs/5_Battle_01_Scene.rb', line 600 def cry( = false) end |
#done? ⇒ Boolean
Tell if the sprite animations are done
592 593 |
# File 'docs/5_Battle_01_Scene.rb', line 592 def done? end |
#flee_animation ⇒ Yuki::Animation::TimedAnimation
Creates the flee animation
640 641 |
# File 'docs/5_Battle_01_Scene.rb', line 640 def flee_animation end |
#opacity=(opacity)
Set the opacity of the sprite
628 629 |
# File 'docs/5_Battle_01_Scene.rb', line 628 def opacity=(opacity) end |
#set_origin(ox, oy) ⇒ self
Set the origin of the sprite & the shadow
606 607 |
# File 'docs/5_Battle_01_Scene.rb', line 606 def set_origin(ox, oy) end |
#set_position(x, y) ⇒ self
Set the position of the sprite
616 617 |
# File 'docs/5_Battle_01_Scene.rb', line 616 def set_position(x, y) end |
#substitute_animations_speed ⇒ Float
Return the Substitute animations speed
650 651 |
# File 'docs/5_Battle_01_Scene.rb', line 650 def substitute_animations_speed end |
#switch_from_substitute_animation
Creates the switch from substitute animation
646 647 |
# File 'docs/5_Battle_01_Scene.rb', line 646 def switch_from_substitute_animation end |
#switch_to_substitute_animation
Creates the switch to substitute animation
643 644 |
# File 'docs/5_Battle_01_Scene.rb', line 643 def switch_to_substitute_animation end |
#switch_to_substitute_sprite
Directly switch the PokemonSprite appearance to the substitute appearance
657 658 |
# File 'docs/5_Battle_01_Scene.rb', line 657 def switch_to_substitute_sprite end |
#under_substitute_effect? ⇒ Boolean
Tell if the Pokemon represented by this sprite is under the effect of Substitute
654 655 |
# File 'docs/5_Battle_01_Scene.rb', line 654 def under_substitute_effect? end |
#update
Update the sprite
588 589 |
# File 'docs/5_Battle_01_Scene.rb', line 588 def update end |
#visible=(visible)
Set the visibility of the sprite
636 637 |
# File 'docs/5_Battle_01_Scene.rb', line 636 def visible=(visible) end |
#x=(x)
Set the x position of the sprite
624 625 |
# File 'docs/5_Battle_01_Scene.rb', line 624 def x=(x) end |
#y=(y)
Set the y position of the sprite
620 621 |
# File 'docs/5_Battle_01_Scene.rb', line 620 def y=(y) end |
#zoom=(zoom)
Set the zoom of the sprite
610 611 |
# File 'docs/5_Battle_01_Scene.rb', line 610 def zoom=(zoom) end |