Class: UI::Storage::PartyStack

Inherits:
UI::SpriteStack show all
Defined in:
docs/4_Systems_200_Storage.rb

Overview

Stack responsive of showing a party

Constant Summary collapse

SLOT_IMAGES =

List of images according to the mode

{pokemon: 'pc/party_pkmn', item: 'pc/party_items', battle: 'pc/party_battle'}
POKEMON_COORDINATES =

List of coordinate for Pokemon sprite

[[224, 64], [272, 80], [224, 112], [272, 128], [224, 160], [272, 176]]

Constants inherited from UI::SpriteStack

UI::SpriteStack::NO_INITIAL_IMAGE

Instance Attribute Summary collapse

Attributes inherited from UI::SpriteStack

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

Instance Method Summary collapse

Methods inherited from UI::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, mode_handler, selection_handler) ⇒ PartyStack

Create a new party stack

Parameters:

  • viewport (Viewport)
  • mode_handler (ModeHandler)

    object responsive of handling the mode

  • selection_handler (SelectionHandler)

    object responsive of handling the selection



804
805
# File 'docs/4_Systems_200_Storage.rb', line 804

def initialize(viewport, mode_handler, selection_handler)
end

Instance Attribute Details

#modeSymbol

Get the current mode

Returns:

  • (Symbol)


795
796
797
# File 'docs/4_Systems_200_Storage.rb', line 795

def mode
  @mode
end

Instance Method Details

#data=(data)

Update the data

Parameters:



812
813
# File 'docs/4_Systems_200_Storage.rb', line 812

def data=(data)
end

#gray_pokemon {|pokemon| ... }

Make the pokemon gray depending on a criteria

Yield Parameters:



816
817
# File 'docs/4_Systems_200_Storage.rb', line 816

def gray_pokemon
end

#hovering_left_arrow?Boolean

Tell if the left arrow is hovered

Returns:

  • (Boolean)


828
829
# File 'docs/4_Systems_200_Storage.rb', line 828

def hovering_left_arrow?
end

#hovering_right_arrow?Boolean

Tell if the right arrow is hovered

Returns:

  • (Boolean)


832
833
# File 'docs/4_Systems_200_Storage.rb', line 832

def hovering_right_arrow?
end

#pokemon_spritesArray<Sprite>

Get the Pokemon sprites

Returns:



824
825
# File 'docs/4_Systems_200_Storage.rb', line 824

def pokemon_sprites
end

#update_selection(selection)

Update the selection

Parameters:

  • selection (Array<Integer>)

    current selected Pokemon



808
809
# File 'docs/4_Systems_200_Storage.rb', line 808

def update_selection(selection)
end