Class: BattleUI::InfoBar

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

Overview

Note:

Since .25 InfoBar completely ignore bank & position info about Pokemon to make thing easier regarding positionning

Object that show the Battle Bar of a Pokemon in Battle

Defined Under Namespace

Classes: Background, PokemonCaughtSprite

Constant Summary collapse

HP_BAR_INFO =

The information of the HP Bar

Returns:

  • (Array<Integer>)
[92, 4, 0, 0, 6]
HP_BAR_INFO_V3 =

bw, bh, bx, by, nb_states The information of the HP Bar in 3v3 battles

Returns:

  • (Array<Integer>)
[63, 4, 0, 0, 6]
EXP_BAR_INFO =

The information of the Exp Bar

Returns:

  • (Array<Integer>)
[88, 2, 0, 0, 1]
EXP_BAR_INFO_V3 =

The information of the Exp Bar in 3v3 battles

Returns:

  • (Array<Integer>)
[58, 2, 0, 0, 1]

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, pokemon, bank, position) ⇒ InfoBar

Create a new InfoBar

Parameters:



981
982
# File 'docs/5_Battle_01_Scene.rb', line 981

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

Instance Attribute Details

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

Get the animation handler



965
966
967
# File 'docs/5_Battle_01_Scene.rb', line 965

def animation_handler
  @animation_handler
end

#bank ⇒ Integer (readonly)

Get the bank of the pokemon shown by the sprite

Returns:

  • (Integer)


971
972
973
# File 'docs/5_Battle_01_Scene.rb', line 971

def bank
  @bank
end

#pokemon ⇒ PFM::PokemonBattler

Get the Pokemon shown by the InfoBar

Returns:



962
963
964
# File 'docs/5_Battle_01_Scene.rb', line 962

def pokemon
  @pokemon
end

#position ⇒ Integer (readonly)

Get the position of the pokemon shown by the sprite

Returns:

  • (Integer)


968
969
970
# File 'docs/5_Battle_01_Scene.rb', line 968

def position
  @position
end

#scene ⇒ Battle::Scene (readonly)

Get the scene linked to this object

Returns:



974
975
976
# File 'docs/5_Battle_01_Scene.rb', line 974

def scene
  @scene
end

Instance Method Details

#create_animation

Create the animation



984
985
# File 'docs/5_Battle_01_Scene.rb', line 984

def create_animation
end

#data=(pokemon)

Set the Creature to show in the Info Bar



1001
1002
# File 'docs/5_Battle_01_Scene.rb', line 1001

def data=(pokemon)
end

#done? ⇒ Boolean

Tell if the InfoBar animations are done

Returns:

  • (Boolean)


991
992
# File 'docs/5_Battle_01_Scene.rb', line 991

def done?
end

#refresh

Refresh the bar contents



998
999
# File 'docs/5_Battle_01_Scene.rb', line 998

def refresh
end

#suffix_3v3 ⇒ String

Return a suffix for 3v3 battle resources

Returns:



1005
1006
# File 'docs/5_Battle_01_Scene.rb', line 1005

def suffix_3v3
end

#update

Update the InfoBar



987
988
# File 'docs/5_Battle_01_Scene.rb', line 987

def update
end