Class: UI::VoltorbFlip::BoardCounter

Inherits:
SpriteStack show all
Defined in:
docs/4_Systems_900_Games.rb

Overview

Board counter sprite

Constant Summary

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary

Attributes inherited from SpriteStack

#animated, #data, #font_id, #moving, #stack, #viewport, #x, #y

Instance Method Summary collapse

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, index, column) ⇒ BoardCounter

Create a new board counter

Parameters:

  • viewport (Viewport)
  • index (Integer) —

    index of the counter

  • column (Boolean) —

    if it's a counter in the column or in the row



240
241
# File 'docs/4_Systems_900_Games.rb', line 240

def initialize(viewport, index, column)
end

Instance Method Details

#add_tile(tile)

Add a tile

Parameters:



248
249
# File 'docs/4_Systems_900_Games.rb', line 248

def add_tile(tile)
end

#update_display

Update the counter display according to the tile values



251
252
# File 'docs/4_Systems_900_Games.rb', line 251

def update_display
end

#voltorb_count ⇒ Integer

Return the count of voltorb

Returns:

  • (Integer)


244
245
# File 'docs/4_Systems_900_Games.rb', line 244

def voltorb_count
end