Class: BattleUI::PokemonSprite
- Inherits:
-
ShaderedSprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- ShaderedSprite
- BattleUI::PokemonSprite
- Includes:
- GoingInOut, MultiplePosition
- Defined in:
- docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb
Overview
Sprite of a Pokemon in the battle
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.
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.
-
#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 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
581 582 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 581 def initialize(, scene) end |
Instance Attribute Details
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation} (readonly)
Get the animation handler
568 569 570 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 568 def animation_handler @animation_handler end |
#bank ⇒ Integer (readonly)
Get the bank of the pokemon shown by the sprite
574 575 576 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 574 def bank @bank end |
#pokemon ⇒ PFM::PokemonBattler
Get the Pokemon shown by the sprite
565 566 567 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 565 def pokemon @pokemon end |
#position ⇒ Integer (readonly)
Get the position of the pokemon shown by the sprite
571 572 573 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 571 def position @position end |
#scene ⇒ Battle::Scene (readonly)
Get the scene linked to this object
577 578 579 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 577 def scene @scene end |
#selected ⇒ Boolean
Tell if the sprite is currently selected
562 563 564 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 562 def selected @selected end |
Instance Method Details
#bitmap=(bitmap)
Set the bitmap of the sprite
628 629 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 628 def bitmap=(bitmap) end |
#cry(dying = false)
Play the cry of the Pokemon
596 597 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 596 def cry( = false) end |
#done? ⇒ Boolean
Tell if the sprite animations are done
588 589 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 588 def done? end |
#flee_animation ⇒ Yuki::Animation::TimedAnimation
Creates the flee animation
636 637 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 636 def flee_animation end |
#opacity=(opacity)
Set the opacity of the sprite
624 625 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 624 def opacity=(opacity) end |
#set_origin(ox, oy) ⇒ self
Set the origin of the sprite & the shadow
602 603 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 602 def set_origin(ox, oy) end |
#set_position(x, y) ⇒ self
Set the position of the sprite
612 613 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 612 def set_position(x, y) end |
#update
Update the sprite
584 585 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 584 def update end |
#visible=(visible)
Set the visibility of the sprite
632 633 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 632 def visible=(visible) end |
#x=(x)
Set the x position of the sprite
620 621 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 620 def x=(x) end |
#y=(y)
Set the y position of the sprite
616 617 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 616 def y=(y) end |
#zoom=(zoom)
Set the zoom of the sprite
606 607 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 606 def zoom=(zoom) end |