Class: UI::MiningGame::Hit_Counter_Stack
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::MiningGame::Hit_Counter_Stack
- Defined in:
- docs/4_Systems_801_Mining_Game.rb
Overview
Class that describes the SpriteStack containing all the Hit_Counter_Sprite
Constant Summary collapse
- COORD_X =
X Coordinates of first and second Hit_Counter_Sprite
[206, 182]
- SPACE_BETWEEN_CRACKS =
The X space between all Hit_Counter_Sprite (except first and second)
24
- COORD_Y =
Y Coordinates of first and every other Hit_Counter_Sprite
[0, 2]
- NUMBER_OF_CRACKS =
Max number of Cracks
10
- MAX_NB_HIT =
Max number of hits the wall can take
61
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#nb_hit ⇒ Integer
The current number of hit.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#initialize(viewport) ⇒ Hit_Counter_Stack
constructor
Create the Hit_Counter_Stack.
-
#max_cracks? ⇒ Boolean
Check if the current number of hits is equal the max amount of hit.
-
#send_hit(reason)
Method that send the correct number of hits.
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) ⇒ Hit_Counter_Stack
Create the Hit_Counter_Stack
469 470 |
# File 'docs/4_Systems_801_Mining_Game.rb', line 469 def initialize() end |
Instance Attribute Details
#nb_hit ⇒ Integer
Returns the current number of hit.
466 467 468 |
# File 'docs/4_Systems_801_Mining_Game.rb', line 466 def nb_hit @nb_hit end |
Instance Method Details
#max_cracks? ⇒ Boolean
Check if the current number of hits is equal the max amount of hit
477 478 |
# File 'docs/4_Systems_801_Mining_Game.rb', line 477 def max_cracks? end |
#send_hit(reason)
Method that send the correct number of hits
473 474 |
# File 'docs/4_Systems_801_Mining_Game.rb', line 473 def send_hit(reason) end |