Class: UI::InfoBox::ScoreBar
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::InfoBox::ScoreBar
- Defined in:
- docs/6_Contest_01_Scene.rb
Overview
Class that represents the score bar in the info box
Constant Summary
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#current_score ⇒ Integer
Current score value.
-
#score_hearts ⇒ Array<SpriteSheet>
readonly
Score hearts sprites.
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.
-
#initialize(viewport) ⇒ ScoreBar
constructor
Create a new ScoreBar.
-
#reset
Reset the score bar to empty.
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, #update_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=
Constructor Details
#initialize(viewport) ⇒ ScoreBar
Create a new ScoreBar
456 457 |
# File 'docs/6_Contest_01_Scene.rb', line 456 def initialize() end |
Instance Attribute Details
#current_score ⇒ Integer
Current score value
450 451 452 |
# File 'docs/6_Contest_01_Scene.rb', line 450 def current_score @current_score end |
#score_hearts ⇒ Array<SpriteSheet> (readonly)
Score hearts sprites
453 454 455 |
# File 'docs/6_Contest_01_Scene.rb', line 453 def score_hearts @score_hearts end |
Instance Method Details
#change_score(score) ⇒ Yuki::AnimationMixin
Change the score shown in the score bar
464 465 |
# File 'docs/6_Contest_01_Scene.rb', line 464 def change_score(score) end |
#reset
Reset the score bar to empty
459 460 |
# File 'docs/6_Contest_01_Scene.rb', line 459 def reset end |