Class: BattleUI::AbilityBar

Inherits:
UI::SpriteStack show all
Includes:
GoingInOut, MultiplePosition, UI
Defined in:
docs/5_Battle_01_Scene.rb

Overview

Sprite of an Ability Bar in the battle

Direct Known Subclasses

ItemBar

Defined Under Namespace

Classes: Background

Constant Summary

Constants inherited from UI::SpriteStack

UI::SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

Attributes inherited from UI::SpriteStack

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

Instance Method Summary collapse

Methods included from MultiplePosition

#enemy?

Methods included from GoingInOut

#go_in, #go_out, #in?, #out?

Methods inherited from UI::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, scene, bank, position) ⇒ AbilityBar

Create a new Ability Bar

Parameters:



1293
1294
# File 'docs/5_Battle_01_Scene.rb', line 1293

def initialize(viewport, scene, bank, position)
end

Instance Attribute Details

#animation_handler ⇒ Yuki::Animation::Handler{ Symbol => Yuki::AnimationMixin} (readonly)

Get the animation handler



1275
1276
1277
# File 'docs/5_Battle_01_Scene.rb', line 1275

def animation_handler
  @animation_handler
end

#bank ⇒ Integer (readonly)

Get the bank of the pokemon shown by the sprite

Returns:

  • (Integer)


1281
1282
1283
# File 'docs/5_Battle_01_Scene.rb', line 1281

def bank
  @bank
end

#no_go_out ⇒ Boolean (readonly)

Get if the animation out should be not played automatically

Returns:

  • (Boolean)


1287
1288
1289
# File 'docs/5_Battle_01_Scene.rb', line 1287

def no_go_out
  @no_go_out
end

#position ⇒ Integer (readonly)

Get the position of the pokemon shown by the sprite

Returns:

  • (Integer)


1278
1279
1280
# File 'docs/5_Battle_01_Scene.rb', line 1278

def position
  @position
end

#scene ⇒ Battle::Scene (readonly)

Get the scene linked to this object

Returns:



1284
1285
1286
# File 'docs/5_Battle_01_Scene.rb', line 1284

def scene
  @scene
end

Instance Method Details

#create_animation

Create the animation



1296
1297
# File 'docs/5_Battle_01_Scene.rb', line 1296

def create_animation
end

#done? ⇒ Boolean

Tell if the animations are done

Returns:

  • (Boolean)


1303
1304
# File 'docs/5_Battle_01_Scene.rb', line 1303

def done?
end

#go_in_ability(no_go_out = false)

Tell the ability to go into the scene

Parameters:

  • no_go_out (Boolean) (defaults to: false) —

    Set if the animation out should be not played automatically



1310
1311
# File 'docs/5_Battle_01_Scene.rb', line 1310

def go_in_ability(no_go_out = false)
end

#update

Update the animations



1299
1300
# File 'docs/5_Battle_01_Scene.rb', line 1299

def update
end