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, #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

dir4, dir8, get_text, joy_axis_position, 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



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

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

Instance Method Details

#create_item_desc_window

Create the item description window



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

def create_item_desc_window
end

#create_item_list

Create the item list for the items to sell



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

def create_item_list
end

#create_scrollbar

Create the scrollbar



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

def create_scrollbar
end

#update_graphics

Update the graphics every frame



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

def update_graphics
end

#update_in_stock_item(nb)

Update the number of the actual item currently in stock



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

def update_in_stock_item(nb)
end

#update_item_button_list

Update the item list



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

def update_item_button_list
end

#update_item_desc

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



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

def update_item_desc
end

#update_item_desc_name(name)

Update the name of the item currently shown



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

def update_item_desc_name(name)
end

#update_item_desc_text(text)

Update the description of the item currently shown



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

def update_item_desc_text(text)
end

#update_pkm_specie_text(species)

Update the specie text of the currently shown creature



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

def update_pkm_specie_text(species)
end