Class: BattleUI::InfoBar
- Inherits:
-
UI::SpriteStack
- Object
- UI::SpriteStack
- BattleUI::InfoBar
- Includes:
- GoingInOut, MultiplePosition, UI
- Defined in:
- docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb
Overview
Since .25 InfoBar completely ignore bank & position info about Pokemon to make thing easier regarding positionning
Object that show the Battle Bar of a Pokemon in Battle
Defined Under Namespace
Classes: Background, PokemonCaughtSprite
Constant Summary collapse
- HP_BAR_INFO =
The information of the HP Bar
[92, 4, 0, 0, 6]
- EXP_BAR_INFO =
bw, bh, bx, by, nb_states The information of the Exp Bar
[88, 2, 0, 0, 1]
Constants inherited from UI::SpriteStack
UI::SpriteStack::NO_INITIAL_IMAGE
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 InfoBar.
-
#position ⇒ Integer
readonly
Get the position of the pokemon shown by the sprite.
-
#scene ⇒ Battle::Scene
readonly
Get the scene linked to this object.
Attributes inherited from UI::SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#data=(pokemon)
Set the Creature to show in the Info Bar.
-
#done? ⇒ Boolean
Tell if the InfoBar animations are done.
-
#initialize(viewport, scene, pokemon, bank, position) ⇒ InfoBar
constructor
Create a new InfoBar.
-
#refresh
Refresh the bar contents.
-
#update
Update the InfoBar.
Methods included from MultiplePosition
Methods included from GoingInOut
Methods inherited from UI::SpriteStack
#[], #add_background, #add_line, #add_text, #anime, #anime_delta_set, #dispose, #each, #execute_anime, #move, #move_to, #opacity, #opacity=, #push, #push_sprite, #set_origin, #set_position, #simple_mouse_in?, #size, #stop_animation, #translate_mouse_coords, #update_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=
Constructor Details
#initialize(viewport, scene, pokemon, bank, position) ⇒ InfoBar
Create a new InfoBar
749 750 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 749 def initialize(, scene, pokemon, bank, position) end |
Instance Attribute Details
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation} (readonly)
Get the animation handler
733 734 735 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 733 def animation_handler @animation_handler end |
#bank ⇒ Integer (readonly)
Get the bank of the pokemon shown by the sprite
739 740 741 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 739 def bank @bank end |
#pokemon ⇒ PFM::PokemonBattler
Get the Pokemon shown by the InfoBar
730 731 732 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 730 def pokemon @pokemon end |
#position ⇒ Integer (readonly)
Get the position of the pokemon shown by the sprite
736 737 738 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 736 def position @position end |
#scene ⇒ Battle::Scene (readonly)
Get the scene linked to this object
742 743 744 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 742 def scene @scene end |
Instance Method Details
#data=(pokemon)
Set the Creature to show in the Info Bar
766 767 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 766 def data=(pokemon) end |
#done? ⇒ Boolean
Tell if the InfoBar animations are done
756 757 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 756 def done? end |
#refresh
Refresh the bar contents
763 764 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 763 def refresh end |
#update
Update the InfoBar
752 753 |
# File 'docs/01600_Alpha_25_Battle_Engine_00001_Battle_Scene.rb', line 752 def update end |