Class: BattleUI::InfoBar
- Inherits:
-
UI::SpriteStack
- Object
- UI::SpriteStack
- BattleUI::InfoBar
- Includes:
- GoingInOut, MultiplePosition, UI
- Defined in:
- docs/5_Battle_01_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]
- HP_BAR_INFO_V3 =
bw, bh, bx, by, nb_states The information of the HP Bar in 3v3 battles
[63, 4, 0, 0, 6]
- EXP_BAR_INFO =
The information of the Exp Bar
[88, 2, 0, 0, 1]
- EXP_BAR_INFO_V3 =
The information of the Exp Bar in 3v3 battles
[58, 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::AnimationMixin}
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, #font_id, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#create_animation
Create the animation.
-
#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.
-
#suffix_3v3 ⇒ String
Return a suffix for 3v3 battle resources.
-
#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
981 982 |
# File 'docs/5_Battle_01_Scene.rb', line 981 def initialize(, scene, pokemon, bank, position) end |
Instance Attribute Details
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::AnimationMixin} (readonly)
Get the animation handler
965 966 967 |
# File 'docs/5_Battle_01_Scene.rb', line 965 def animation_handler @animation_handler end |
#bank ⇒ Integer (readonly)
Get the bank of the pokemon shown by the sprite
971 972 973 |
# File 'docs/5_Battle_01_Scene.rb', line 971 def bank @bank end |
#pokemon ⇒ PFM::PokemonBattler
Get the Pokemon shown by the InfoBar
962 963 964 |
# File 'docs/5_Battle_01_Scene.rb', line 962 def pokemon @pokemon end |
#position ⇒ Integer (readonly)
Get the position of the pokemon shown by the sprite
968 969 970 |
# File 'docs/5_Battle_01_Scene.rb', line 968 def position @position end |
#scene ⇒ Battle::Scene (readonly)
Get the scene linked to this object
974 975 976 |
# File 'docs/5_Battle_01_Scene.rb', line 974 def scene @scene end |
Instance Method Details
#create_animation
Create the animation
984 985 |
# File 'docs/5_Battle_01_Scene.rb', line 984 def create_animation end |
#data=(pokemon)
Set the Creature to show in the Info Bar
1001 1002 |
# File 'docs/5_Battle_01_Scene.rb', line 1001 def data=(pokemon) end |
#done? ⇒ Boolean
Tell if the InfoBar animations are done
991 992 |
# File 'docs/5_Battle_01_Scene.rb', line 991 def done? end |
#refresh
Refresh the bar contents
998 999 |
# File 'docs/5_Battle_01_Scene.rb', line 998 def refresh end |
#suffix_3v3 ⇒ String
Return a suffix for 3v3 battle resources
1005 1006 |
# File 'docs/5_Battle_01_Scene.rb', line 1005 def suffix_3v3 end |
#update
Update the InfoBar
987 988 |
# File 'docs/5_Battle_01_Scene.rb', line 987 def update end |