Class: UI::MoveTeaching::PokemonInfos
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::MoveTeaching::PokemonInfos
- Defined in:
- scripts/01450 Systems/00301 MoveTeaching/00002 UI/00020 PokemonInfos.rb
Overview
UI part displaying the Pokémon informations in the Skill Learn scene
Constant Summary collapse
- NO_GENDER =
List of Pokemon that shouldn't show the gender sprite
%i[nidoranf nidoranm]
Constants inherited from SpriteStack
Instance Attribute Summary
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#data=(pokemon)
Set the data of the Pokemon.
-
#initialize(viewport) ⇒ PokemonInfos
constructor
Create sprite & some informations of the Pokémon.
-
#update_graphics
Update the graphics.
Methods inherited from 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, #update_animation, #update_position, #visible, #visible=, #with_cache, #with_font, #with_surface, #z, #z=
Constructor Details
#initialize(viewport) ⇒ PokemonInfos
Create sprite & some informations of the Pokémon
9 10 11 12 |
# File 'scripts/01450 Systems/00301 MoveTeaching/00002 UI/00020 PokemonInfos.rb', line 9 def initialize() super(, 8, 15, default_cache: :interface) create_sprites end |
Instance Method Details
#data=(pokemon)
Set the data of the Pokemon
15 16 17 18 19 |
# File 'scripts/01450 Systems/00301 MoveTeaching/00002 UI/00020 PokemonInfos.rb', line 15 def data=(pokemon) super @gender.x = @name.x + @name.real_width + 2 @gender.visible = false if NO_GENDER.include?(pokemon.db_symbol) end |
#update_graphics
Update the graphics
22 23 24 |
# File 'scripts/01450 Systems/00301 MoveTeaching/00002 UI/00020 PokemonInfos.rb', line 22 def update_graphics @sprite.update end |