Class: UI::InfoBox
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::InfoBox
- Includes:
- BattleUI::GoingInOut, UI
- Defined in:
- docs/6_Contest_01_Scene.rb
Overview
Class that represents the Info Box of a creature during a contest
Defined Under Namespace
Classes: ScoreBar
Constant Summary collapse
- BOX_X_COORDINATES =
X Coordinate of the info box depending on its index
[3, 83, 163, 243]
- SKIP_TURN_EFFECTS =
List of effects that prevent make the creature skip its turn
%i[skip_turn]
- PREVENT_JAM_EFFECTS =
List of effects that prevent jam effects
%i[prevent_jam_one_turn prevent_jam_one_time]
- NERVOUS_EFFECTS =
List of effects that make nervous
%i[nervous]
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::AnimationMixin}
readonly
Get the animation handler.
-
#condition_star_sprites ⇒ Array<UI::Sprite>
readonly
Confidence stars sprites.
-
#index ⇒ Integer
readonly
Index of the info box.
-
#scene ⇒ Contest::Scene
readonly
Get the scene linked to this object.
Attributes inherited from SpriteStack
#animated, #data, #font_id, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#change_score(score) ⇒ Yuki::AnimationMixin
Change the score shown in the score bar.
-
#create_animation
Create the animation.
-
#data=(creature)
Sets the creature shown by this box.
-
#done? ⇒ Boolean
Tell if the InfoBox animations are done.
-
#initialize(viewport, scene, index) ⇒ InfoBox
constructor
Create a new InfoBox.
-
#refresh
Refresh the box contents.
-
#refresh_icon
Refresh the creature icon.
-
#selected=(selected)
Sets whether the info box is selected.
-
#update
Update the InfoBox.
Methods included from BattleUI::GoingInOut
Methods inherited from 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, index) ⇒ InfoBox
Create a new InfoBox
375 376 |
# File 'docs/6_Contest_01_Scene.rb', line 375 def initialize(, scene, index) end |
Instance Attribute Details
#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::AnimationMixin} (readonly)
Get the animation handler
361 362 363 |
# File 'docs/6_Contest_01_Scene.rb', line 361 def animation_handler @animation_handler end |
#condition_star_sprites ⇒ Array<UI::Sprite> (readonly)
Confidence stars sprites
367 368 369 |
# File 'docs/6_Contest_01_Scene.rb', line 367 def condition_star_sprites @condition_star_sprites end |
#index ⇒ Integer (readonly)
Index of the info box
364 365 366 |
# File 'docs/6_Contest_01_Scene.rb', line 364 def index @index end |
#scene ⇒ Contest::Scene (readonly)
Get the scene linked to this object
370 371 372 |
# File 'docs/6_Contest_01_Scene.rb', line 370 def scene @scene end |
Instance Method Details
#change_score(score) ⇒ Yuki::AnimationMixin
Change the score shown in the score bar
405 406 |
# File 'docs/6_Contest_01_Scene.rb', line 405 def change_score(score) end |
#create_animation
Create the animation
378 379 |
# File 'docs/6_Contest_01_Scene.rb', line 378 def create_animation end |
#data=(creature)
Sets the creature shown by this box
389 390 |
# File 'docs/6_Contest_01_Scene.rb', line 389 def data=(creature) end |
#done? ⇒ Boolean
Tell if the InfoBox animations are done
385 386 |
# File 'docs/6_Contest_01_Scene.rb', line 385 def done? end |
#refresh
Refresh the box contents
396 397 |
# File 'docs/6_Contest_01_Scene.rb', line 396 def refresh end |
#refresh_icon
Used to refresh only the icon during mega-evolution
Refresh the creature icon
393 394 |
# File 'docs/6_Contest_01_Scene.rb', line 393 def refresh_icon end |
#selected=(selected)
Sets whether the info box is selected
400 401 |
# File 'docs/6_Contest_01_Scene.rb', line 400 def selected=(selected) end |
#update
Update the InfoBox
381 382 |
# File 'docs/6_Contest_01_Scene.rb', line 381 def update end |