Class: UI::Hall_of_Fame::Star_Animation

Inherits:
SpriteSheet show all
Defined in:
docs/01450_Systems_00300_Hall_of_fame.rb

Overview

Class that define the Star Animation

Instance Attribute Summary collapse

Attributes inherited from SpriteSheet

#nb_x, #nb_y, #sx, #sy

Attributes inherited from LiteRGSS::ShaderedSprite

#blendmode, #shader

Attributes inherited from LiteRGSS::Sprite

#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y

Instance Method Summary collapse

Methods inherited from SpriteSheet

#bitmap=, #resize, #select

Methods inherited from Sprite

#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords

Methods inherited from LiteRGSS::Sprite

new, #set_origin, #set_position

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

#initialize(viewport, frame_count = 2, repeat: false) ⇒ Star_Animation

Initialize the SpriteSheet

Parameters:

  • viewport (Viewport)
  • frame_count (Integer) (defaults to: 2)

    how many frames between each anim update

  • repeat (Boolean) (defaults to: false)

    if the animation has to repeat itself



108
109
# File 'docs/01450_Systems_00300_Hall_of_fame.rb', line 108

def initialize(viewport, frame_count = 2, repeat: false)
end

Instance Attribute Details

#counterInteger

The counter for the animation

Returns:

  • (Integer)


100
101
102
# File 'docs/01450_Systems_00300_Hall_of_fame.rb', line 100

def counter
  @counter
end

#finishedBoolean

Tell if the animation is finished or not

Returns:

  • (Boolean)


103
104
105
# File 'docs/01450_Systems_00300_Hall_of_fame.rb', line 103

def finished
  @finished
end

Instance Method Details

#update

Update the animation depending on the @frame_count



111
112
# File 'docs/01450_Systems_00300_Hall_of_fame.rb', line 111

def update
end