Class: BattleUI::TrainerPartyBalls

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

Overview

Object that display the Battle Party Balls of a trainer in Battle

Remaining Pokemon, Pokemon with status

Defined Under Namespace

Classes: BallSprite

Constant Summary collapse

BALL_X =

X coordinate of the first ball in the stack depending on the bank

[3, 7]
BALL_Y =

Y coordinate of the first ball in the stack depending on the bank

[-3, -3]
BALL_DELTA =

Delta X between each balls

14

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) ⇒ TrainerPartyBalls

Create a new Trainer Party Balls

Parameters:



1113
1114
# File 'docs/5_Battle_01_Scene.rb', line 1113

def initialize(viewport, scene, bank)
end

Instance Attribute Details

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

Get the animation handler



1099
1100
1101
# File 'docs/5_Battle_01_Scene.rb', line 1099

def animation_handler
  @animation_handler
end

#bank ⇒ Integer (readonly)

Get the bank of the party shown

Returns:

  • (Integer)


1105
1106
1107
# File 'docs/5_Battle_01_Scene.rb', line 1105

def bank
  @bank
end

#position ⇒ Integer (readonly)

Get the position

Returns:

  • (Integer)


1102
1103
1104
# File 'docs/5_Battle_01_Scene.rb', line 1102

def position
  @position
end

#scene ⇒ Battle::Scene (readonly)

Get the scene linked to this object

Returns:



1108
1109
1110
# File 'docs/5_Battle_01_Scene.rb', line 1108

def scene
  @scene
end

Instance Method Details

#create_animation

Create the animation



1116
1117
# File 'docs/5_Battle_01_Scene.rb', line 1116

def create_animation
end

#done? ⇒ Boolean

Tell if the UI has done displaying its animation

Returns:

  • (Boolean)


1126
1127
# File 'docs/5_Battle_01_Scene.rb', line 1126

def done?
end

#refresh

Refresh the content of the bar



1122
1123
# File 'docs/5_Battle_01_Scene.rb', line 1122

def refresh
end

#update

Update all the animation of this UI element



1119
1120
# File 'docs/5_Battle_01_Scene.rb', line 1119

def update
end