Class: UI::Casino::NumberDisplay

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

Overview

Object showing images of credit / payout element in casino UI

Constant Summary collapse

FILES =

List of files that shows the number

['casino/n0', 'casino/n1', 'casino/n2', 'casino/n3', 'casino/n4', 'casino/n5', 'casino/n6', 'casino/n7', 'casino/n8', 'casino/n9']
DELTA =

Delta of number between each frame

3

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

Attributes inherited from SpriteStack

#animated, #data, #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_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=

Constructor Details

#initialize(viewport, x, y, max_numbers) ⇒ NumberDisplay

Create a new NumberDipslay

Parameters:

  • viewport (Viewport)
  • x (Integer)
  • y (Integer)
  • max_numbers (Integer)

    maximum number of numbers to display



21
22
# File 'docs/4_Systems_900_Games.rb', line 21

def initialize(viewport, x, y, max_numbers)
end

Instance Attribute Details

#numberInteger

Number that is currently displayed

Returns:

  • (Integer)


12
13
14
# File 'docs/4_Systems_900_Games.rb', line 12

def number
  @number
end

#targetInteger

Target that the UI element should animatedly aim

Returns:

  • (Integer)


15
16
17
# File 'docs/4_Systems_900_Games.rb', line 15

def target
  @target
end

Instance Method Details

#done?Boolean

Tell if the animation is done

Returns:

  • (Boolean)


32
33
# File 'docs/4_Systems_900_Games.rb', line 32

def done?
end

#update

Update the animation



28
29
# File 'docs/4_Systems_900_Games.rb', line 28

def update
end