Class: GamePlay::Pokemon_Shop

Inherits:
Shop show all
Includes:
UI::Shop
Defined in:
docs/4_Systems_203_Shop.rb

Overview

Creature shop scene

Constant Summary collapse

MOUSE_OVER_ENABLED =

Tell if the mouse over is enabled

false

Constants inherited from BaseCleanUpdate

BaseCleanUpdate::AIU_KEY2METHOD

Constants inherited from Base

Base::DEFAULT_TRANSITION, Base::DEFAULT_TRANSITION_PARAMETER

Constants included from Input

Input::ALIAS_KEYS, Input::AXIS_MAPPING, Input::AXIS_SENSITIVITY, Input::DEAD_ZONE, Input::Keyboard, Input::Keys, Input::NON_TRIGGER_ZONE, Input::REPEAT_COOLDOWN, Input::REPEAT_SPACE

Constants included from DisplayMessage

DisplayMessage::MESSAGE_ERROR, DisplayMessage::MESSAGE_PROCESS_ERROR

Instance Attribute Summary

Attributes inherited from Base

#__last_scene, #__result_process, #clock, #running, #viewport

Attributes included from DisplayMessage

#message_window

Instance Method Summary collapse

Methods inherited from Shop

#create_arrow, #create_base_ui, #create_graphics, #create_money_window, #create_shop_banner, #update_arrow, #update_inputs, #update_money_text, #update_mouse, #update_nb_item, #update_scrollbar

Methods inherited from BaseCleanUpdate::FrameBalanced

#update

Methods included from Graphics::FPSBalancer::Marker

#frame_balanced?

Methods inherited from BaseCleanUpdate

#automatic_input_update, #update

Methods inherited from Base

#add_disposable, #call_scene, #dispose, #find_parent, #main, #return_to_scene, #snap_to_bitmap, #update, #visible, #visible=

Methods included from Input

clear, close_virtual_keyboard, dir4, dir8, get_text, joy_axis_position, load_touch_screen, open_virtual_keyboard, press?, register_events, released?, repeat?, swap_states, trigger?

Methods included from DisplayMessage

#can_display_message_be_called?, #close_message_window, #display_message, #display_message_and_wait, #message_class, #message_processing?, #message_visible, #message_visible=

Constructor Details

#initialize(symbol_shop) ⇒ Pokemon_Shop #initialize(symbol_shop, prices) ⇒ Pokemon_Shop #initialize(list_id_pokemon, prices, parameters) ⇒ Pokemon_Shop

Create a new Pokemon Shop

Examples:

Opening an already defined shop with limited Pokemon

GamePlay::Pokemon_Shop.new(:pkm_shop_celadon) # Will open the Shop with symbol :pkm_shop_celadon (the shop must be already defined beforehand)

Opening an already defined shop with limited pokemon but with temporarily overwritten price

GamePlay::Pokemon_Shop.new(:pkm_shop_celadon, {17: 300, 25: 3000}) # Will open the Shop with symbol :pkm_shop_celadon while overwritting the price for pokemon with ID 17 or 25

Opening a simple pokemon shop

GamePlay::Pokemon_Shop.new([25, 52], [2500, 500], [50, { level: 15, form: 1 }]) # Will open a Shop selling Pikachu lvl 50 at 2500 P$ and Alolan Meowth lvl 15 at 500 P$

Overloads:

  • #initialize(symbol_shop) ⇒ Pokemon_Shop

    Parameters:

    • symbol_shop (Symbol) —

      the symbol of the pokemon shop to open

  • #initialize(symbol_shop, prices) ⇒ Pokemon_Shop

    Parameters:

    • symbol_shop (Symbol) —

      the symbol of the pokemon shop to open

    • prices (Hash) —

      the hash containing the new price (value) of a pokemon id (key)

  • #initialize(list_id_pokemon, prices, parameters) ⇒ Pokemon_Shop

    Parameters:

    • list_id_pkm (Array) —

      the array containing the id of the pokemon to sell

    • prices (Array) —

      the array containing the price of each pokemon



651
652
# File 'docs/4_Systems_203_Shop.rb', line 651

def initialize(symbol_or_list, prices = {}, parameters = [], show_background: true)
end

Instance Method Details

#create_item_desc_window

Create the item description window



679
680
# File 'docs/4_Systems_203_Shop.rb', line 679

def create_item_desc_window
end

#create_item_list

Create the item list for the items to sell



673
674
# File 'docs/4_Systems_203_Shop.rb', line 673

def create_item_list
end

#create_scrollbar

Create the scrollbar



697
698
# File 'docs/4_Systems_203_Shop.rb', line 697

def create_scrollbar
end

#update_graphics

Update the graphics every frame



670
671
# File 'docs/4_Systems_203_Shop.rb', line 670

def update_graphics
end

#update_in_stock_item(nb)

Update the number of the actual item currently in stock



694
695
# File 'docs/4_Systems_203_Shop.rb', line 694

def update_in_stock_item(nb)
end

#update_item_button_list

Update the item list



676
677
# File 'docs/4_Systems_203_Shop.rb', line 676

def update_item_button_list
end

#update_item_desc

Method that calls all the informations updating method of the description window



682
683
# File 'docs/4_Systems_203_Shop.rb', line 682

def update_item_desc
end

#update_item_desc_name(name)

Update the name of the item currently shown



685
686
# File 'docs/4_Systems_203_Shop.rb', line 685

def update_item_desc_name(name)
end

#update_item_desc_text(text)

Update the description of the item currently shown



688
689
# File 'docs/4_Systems_203_Shop.rb', line 688

def update_item_desc_text(text)
end

#update_pkm_specie_text(species)

Update the specie text of the currently shown creature



691
692
# File 'docs/4_Systems_203_Shop.rb', line 691

def update_pkm_specie_text(species)
end