Class: UI::Hall_of_Fame::Pokemon_Battler_Stack
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::Hall_of_Fame::Pokemon_Battler_Stack
- Defined in:
- scripts/01450 Systems/00300 Hall of fame/00002 UI/00002 Pokemon_Battler_Stack.rb
Overview
Class that define the stack containing the Pokemon's battlers
Constant Summary collapse
- COLORS =
[[0, 0, 0, 255], [188, 187, 187, 255], [224, 56, 24, 255], [8, 124, 248, 255], [248, 208, 64, 255], [32, 192, 80, 255], [125, 186, 228, 255], [190, 74, 39, 255], [178, 74, 155, 255], [183, 122, 36, 255], [78, 176, 228, 255], [212, 108, 170, 255], [176, 213, 115, 255], [173, 126, 94, 255], [136, 111, 186, 255], [75, 155, 217, 255], [172, 178, 188, 255], [184, 85, 140, 255], [221, 139, 180, 255]]
- X_LEFT =
-48
- X_RIGHT =
78
- X_COLOR_RIGHT =
88
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#battlebacks ⇒ Array<UI::PokemonBackSprite>
The Array containing every back sprites of the player team.
-
#battlefronts ⇒ Array<UI::PokemonFaceSprite>
The Array containing every front sprites of the player team.
-
#withcolorbacks ⇒ Array<Sprite::WithColor>
The Array containing every colored back sprites of the player team.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#initialize(viewport) ⇒ Pokemon_Battler_Stack
constructor
Initialize the SpriteStack.
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) ⇒ Pokemon_Battler_Stack
Initialize the SpriteStack
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00002 Pokemon_Battler_Stack.rb', line 24 def initialize() super() @withcolorbacks = Array.new($actors.size) { add_sprite(*withcolor_initial_pos, NO_INITIAL_IMAGE, type: Sprite::WithColor) } @battlebacks = Array.new($actors.size) { add_sprite(*back_initial_pos, NO_INITIAL_IMAGE, type: PokemonBackSprite) } @battlefronts = Array.new($actors.size) { add_sprite(*front_initial_pos, NO_INITIAL_IMAGE, type: PokemonFaceSprite) } $actors.each_with_index do |pkm, index| @battlebacks[index].data = pkm @battlefronts[index].data = pkm @withcolorbacks[index].set_bitmap(@battlefronts[index].bitmap) set_origin_withcolorbacks r, g, b, a = COLORS[pkm.type1] @withcolorbacks[index].set_color(Color.new(r, g, b, a)) end end |
Instance Attribute Details
#battlebacks ⇒ Array<UI::PokemonBackSprite>
The Array containing every back sprites of the player team
15 16 17 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00002 Pokemon_Battler_Stack.rb', line 15 def battlebacks @battlebacks end |
#battlefronts ⇒ Array<UI::PokemonFaceSprite>
The Array containing every front sprites of the player team
18 19 20 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00002 Pokemon_Battler_Stack.rb', line 18 def battlefronts @battlefronts end |
#withcolorbacks ⇒ Array<Sprite::WithColor>
The Array containing every colored back sprites of the player team
21 22 23 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00002 Pokemon_Battler_Stack.rb', line 21 def withcolorbacks @withcolorbacks end |