Class: BattleUI::AbilityBar

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

Overview

Sprite of a Trainer 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, #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:



1041
1042
# File 'docs/5_Battle_01_Scene.rb', line 1041

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

Instance Attribute Details

#animation_handlerYuki::Animation::Handler{ Symbol => Yuki::Animation::TimedAnimation} (readonly)

Get the animation handler



1023
1024
1025
# File 'docs/5_Battle_01_Scene.rb', line 1023

def animation_handler
  @animation_handler
end

#bankInteger (readonly)

Get the bank of the pokemon shown by the sprite

Returns:

  • (Integer)


1029
1030
1031
# File 'docs/5_Battle_01_Scene.rb', line 1029

def bank
  @bank
end

#no_go_outBoolean (readonly)

Get if the animation out should be not played automatically

Returns:

  • (Boolean)


1035
1036
1037
# File 'docs/5_Battle_01_Scene.rb', line 1035

def no_go_out
  @no_go_out
end

#positionInteger (readonly)

Get the position of the pokemon shown by the sprite

Returns:

  • (Integer)


1026
1027
1028
# File 'docs/5_Battle_01_Scene.rb', line 1026

def position
  @position
end

#sceneBattle::Scene (readonly)

Get the scene linked to this object

Returns:



1032
1033
1034
# File 'docs/5_Battle_01_Scene.rb', line 1032

def scene
  @scene
end

Instance Method Details

#done?Boolean

Tell if the animations are done

Returns:

  • (Boolean)


1048
1049
# File 'docs/5_Battle_01_Scene.rb', line 1048

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



1055
1056
# File 'docs/5_Battle_01_Scene.rb', line 1055

def go_in_ability(no_go_out = false)
end

#update

Update the animations



1044
1045
# File 'docs/5_Battle_01_Scene.rb', line 1044

def update
end