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

[92, 4, 0, 0, 6]
EXP_BAR_INFO =

bw, bh, bx, by, nb_states The information of the Exp Bar

[88, 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, #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:



773
774
# File 'docs/5_Battle_01_Scene.rb', line 773

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

Instance Attribute Details

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

Get the animation handler



757
758
759
# File 'docs/5_Battle_01_Scene.rb', line 757

def animation_handler
  @animation_handler
end

#bankInteger (readonly)

Get the bank of the pokemon shown by the sprite

Returns:

  • (Integer)


763
764
765
# File 'docs/5_Battle_01_Scene.rb', line 763

def bank
  @bank
end

#pokemonPFM::PokemonBattler

Get the Pokemon shown by the InfoBar

Returns:



754
755
756
# File 'docs/5_Battle_01_Scene.rb', line 754

def pokemon
  @pokemon
end

#positionInteger (readonly)

Get the position of the pokemon shown by the sprite

Returns:

  • (Integer)


760
761
762
# File 'docs/5_Battle_01_Scene.rb', line 760

def position
  @position
end

#sceneBattle::Scene (readonly)

Get the scene linked to this object

Returns:



766
767
768
# File 'docs/5_Battle_01_Scene.rb', line 766

def scene
  @scene
end

Instance Method Details

#data=(pokemon)

Set the Creature to show in the Info Bar



790
791
# File 'docs/5_Battle_01_Scene.rb', line 790

def data=(pokemon)
end

#done?Boolean

Tell if the InfoBar animations are done

Returns:

  • (Boolean)


780
781
# File 'docs/5_Battle_01_Scene.rb', line 780

def done?
end

#refresh

Refresh the bar contents



787
788
# File 'docs/5_Battle_01_Scene.rb', line 787

def refresh
end

#update

Update the InfoBar



776
777
# File 'docs/5_Battle_01_Scene.rb', line 776

def update
end