Class: UI::StatusAnimation

Overview

Class that describes the Basic Status Animation used when a Creature is affected by a status condition

Defined Under Namespace

Classes: AttractAnimation, BurnAnimation, ConfusionAnimation, FreezeAnimation, ParalyzeAnimation, PoisonAnimation, SleepAnimation

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

Class Method Summary collapse

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, status, z, bank, scene = $scene) ⇒ StatusAnimation

Create a new StatusAnimation

Parameters:

  • viewport (Viewport)
  • status (Symbol) —

    Symbol of the status

  • z (Integer)
  • bank (Integer) —

    bank of the Creature

  • scene (Battle::Scene) (defaults to: $scene)


2162
2163
# File 'docs/5_Battle_02_Visual.rb', line 2162

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

Instance Attribute Details

#status ⇒ Symbol (readonly)

Get the db_symbol of the status

Returns:

  • (Symbol)


2154
2155
2156
# File 'docs/5_Battle_02_Visual.rb', line 2154

def status
  @status
end

Class Method Details

.new(viewport, status, z, bank, scene = $scene) ⇒ StatusAnimation

Create a new Status animation

Parameters:

  • viewport (Viewport)
  • status (Symbol) —

    db_symbol of the status

  • z (Integer)
  • bank (Integer) —

    bank of the Creature

  • scene (Battle::Scene) (defaults to: $scene)

Returns:



2177
2178
# File 'docs/5_Battle_02_Visual.rb', line 2177

def new(viewport, status, z, bank, scene = $scene)
end

.register(db_symbol, klass)

Register a new status

Parameters:

  • db_symbol (Symbol) —

    db_symbol of the status

  • klass (Class<StatusAnimation>) —

    class of the status animation



2168
2169
# File 'docs/5_Battle_02_Visual.rb', line 2168

def register(db_symbol, klass)
end

Instance Method Details

#animation_progression=(progression)

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

Parameters:

  • progression (Float)


2182
2183
# File 'docs/5_Battle_02_Visual.rb', line 2182

def animation_progression=(progression)
end

#status_duration ⇒ Integer

Return the duration of the Status Animation

Returns:

  • (Integer)


2198
2199
# File 'docs/5_Battle_02_Visual.rb', line 2198

def status_duration
end

#x_offset ⇒ Integer

Return the x offset for the Status Animation

Returns:

  • (Integer)


2190
2191
# File 'docs/5_Battle_02_Visual.rb', line 2190

def x_offset
end

#y_offset ⇒ Integer

Return the y offset for the Status Animation

Returns:

  • (Integer)


2194
2195
# File 'docs/5_Battle_02_Visual.rb', line 2194

def y_offset
end

#z=(z)

Set the z position of the sprite

Parameters:

  • z (Numeric)


2186
2187
# File 'docs/5_Battle_02_Visual.rb', line 2186

def z=(z)
end