Class: UI::StatAnimation

Overview

Class that describes the Stat Animation used when a Creature's stat changes

Constant Summary collapse

COLUMNS =

Constant defining the number of columns in the spritesheet

Returns:

  • (Integer)
12
ROWS =

Constant defining the number of rows in the spritesheet

Returns:

  • (Integer)
10
MAX_INDEX =

Constant defining the maximum index in the spritesheet

Returns:

  • (Integer)
COLUMNS * ROWS - 1

Instance Attribute Summary

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 included from RecenterSprite

#add_position, #recenter

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, #update

Methods inherited from LiteRGSS::Sprite

#set_origin, #set_position

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

#initialize(viewport, amount, z, bank, scene = $scene) ⇒ StatAnimation

Create a new StatAnimation

Parameters:

  • viewport (Viewport)
  • amount (Integer)
  • z (Integer)
  • bank (Integer)
  • scene (Battle::Scene) (defaults to: $scene)


2109
2110
# File 'docs/5_Battle_02_Visual.rb', line 2109

def initialize(viewport, amount, z, bank, scene = $scene)
end

Instance Method Details

#animation_progression=(progression)

Function that change the sprite according to the progression of the animation

Parameters:

  • progression (Float)


2113
2114
# File 'docs/5_Battle_02_Visual.rb', line 2113

def animation_progression=(progression)
end

#x_offset ⇒ Integer

Return the x offset for the Stat Animation

Returns:

  • (Integer)


2125
2126
# File 'docs/5_Battle_02_Visual.rb', line 2125

def x_offset
end

#y_offset ⇒ Integer

Return the y offset for the Stat Animation

Returns:

  • (Integer)


2129
2130
# File 'docs/5_Battle_02_Visual.rb', line 2129

def y_offset
end

#z=(z)

Set the z position of the sprite

Parameters:

  • z (Numeric)


2121
2122
# File 'docs/5_Battle_02_Visual.rb', line 2121

def z=(z)
end

#zoom_value ⇒ Integer

return the zoom value for the bitmap

Returns:

  • (Integer)


2117
2118
# File 'docs/5_Battle_02_Visual.rb', line 2117

def zoom_value
end