Class: UI::Hall_of_Fame::Graveyard_Animation_Stack
- Inherits:
-
SpriteStack
- Object
- SpriteStack
- UI::Hall_of_Fame::Graveyard_Animation_Stack
- Defined in:
- scripts/01450 Systems/00300 Hall of fame/00002 UI/00010 Graveyard_Stack.rb
Overview
Class that define the Graveyard Animation stack
Constant Summary collapse
- SPRITE_X_RIGHT =
422
- SPRITE_X_MIDDLE =
112
- SPRITE_X_LEFT =
-198
- SPRITE_Y =
100
- BOX_X_RIGHT =
320
- BOX_X_MIDDLE =
10
- BOX_X_LEFT =
-300
- BOX_Y =
80
Constants inherited from SpriteStack
Instance Attribute Summary collapse
-
#sprites ⇒ Array<ShaderedSprite>
The array containing every ShaderedSprite.
-
#text_boxes ⇒ Array<UI::Hall_of_Fame::Dead_Pokemon_Text>
The array containing every Dead_Pokemon_Text SpriteStack.
Attributes inherited from SpriteStack
#animated, #data, #moving, #stack, #viewport, #x, #y
Instance Method Summary collapse
-
#initialize(viewport) ⇒ Graveyard_Animation_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) ⇒ Graveyard_Animation_Stack
Initialize the SpriteStack
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00010 Graveyard_Stack.rb', line 21 def initialize() super() @animation = nil @anim_count = 0 @graveyard = PFM.game_state.nuzlocke.graveyard @sprites = Array.new(@graveyard.size) { add_sprite(*initial_pos_sprites, NO_INITIAL_IMAGE, type: ShaderedSprite) } @shader = Shader.create(:full_shader) @shader.set_float_uniform('color', [1, 1, 1, 0]) @shader.set_float_uniform('tone', [0, 0, 0, 1]) @sprites.each_with_index do |sprite, i| sprite.set_bitmap(@graveyard[i].battler_face) sprite.shader = @shader end @text_boxes = Array.new(@graveyard.size) { Dead_Pokemon_Text.new(, *initial_pos_boxes) } @text_boxes.each_with_index do |box, i| box.text = @graveyard[i] end end |
Instance Attribute Details
#sprites ⇒ Array<ShaderedSprite>
The array containing every ShaderedSprite
7 8 9 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00010 Graveyard_Stack.rb', line 7 def sprites @sprites end |
#text_boxes ⇒ Array<UI::Hall_of_Fame::Dead_Pokemon_Text>
The array containing every Dead_Pokemon_Text SpriteStack
10 11 12 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00010 Graveyard_Stack.rb', line 10 def text_boxes @text_boxes end |