Class: BattleUI::TrainerPartyBalls::BallSprite
- Inherits:
-
Sprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- BattleUI::TrainerPartyBalls::BallSprite
- Defined in:
- scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00102 TrainerPartyBalls.rb
Overview
Class showing a ball in the TrainerPartyBalls UI
Instance Attribute Summary
Attributes inherited from LiteRGSS::ShaderedSprite
Attributes inherited from LiteRGSS::Sprite
#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y
Instance Method Summary collapse
-
#data=(party)
Update the data.
-
#image_filename(pokemon)
Get the filename of the image to show as ball sprite.
-
#initialize(viewport, index) ⇒ BallSprite
constructor
Create a new ball.
Methods inherited from Sprite
#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords, #update
Methods inherited from LiteRGSS::Sprite
new, #set_origin, #set_position
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(viewport, index) ⇒ BallSprite
Create a new ball
118 119 120 121 |
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00102 TrainerPartyBalls.rb', line 118 def initialize(, index) super() @index = index end |
Instance Method Details
#data=(party)
Update the data
125 126 127 128 |
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00102 TrainerPartyBalls.rb', line 125 def data=(party) pokemon = party[@index] set_bitmap(image_filename(pokemon), :interface) end |
#image_filename(pokemon)
Get the filename of the image to show as ball sprite
132 133 134 135 136 137 138 |
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00102 TrainerPartyBalls.rb', line 132 def image_filename(pokemon) return 'battle/ball_null' unless pokemon return 'battle/ball_dead' if pokemon.dead? return 'battle/ball_sick' if pokemon.status != 0 return 'battle/ball_normal' end |