Class: UI::Hall_of_Fame::Type_Background

Inherits:
SpriteStack show all
Defined in:
scripts/01450 Systems/00300 Hall of fame/00002 UI/00001 Type_Background.rb

Overview

The class that define the type background displayed during phase 1

Constant Summary

Constants inherited from SpriteStack

SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

Attributes inherited from SpriteStack

#animated, #data, #moving, #stack, #viewport, #x, #y

Instance Method Summary collapse

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

Initialize the SpriteStack

Parameters:

[View source]

13
14
15
16
17
18
19
20
21
22
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00001 Type_Background.rb', line 13

def initialize(viewport)
  super(viewport)
  @type_backgrounds = Array.new($actors.size) { add_sprite(*foreground_pos, NO_INITIAL_IMAGE) }
  @type_foregrounds = Array.new($actors.size) { add_sprite(*foreground_pos, NO_INITIAL_IMAGE) }
  # pkm = [PFM::Pokemon]
  $actors.each_with_index do |pkm, index|
    @type_foregrounds[index].set_bitmap('hall_of_fame/' + pkm.type1.to_s, :interface).opacity = 0
    @type_backgrounds[index].set_bitmap('hall_of_fame/' + pkm.type1.to_s, :interface).opacity = 0
  end
end

Instance Attribute Details

#type_backgroundsArray<Sprite>

The translucent backgrounds

Returns:


10
11
12
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00001 Type_Background.rb', line 10

def type_backgrounds
  @type_backgrounds
end

#type_foregroundsArray<Sprite>

The non-translucent backgrounds

Returns:


7
8
9
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00001 Type_Background.rb', line 7

def type_foregrounds
  @type_foregrounds
end