Activates the buy window
Activates the sell window
Gets the actor object of the scene
Returns:
Name | Type | Description |
---|
window | Window | The window to add as a child |
Check if page buttons should be enabled
Returns:
Type | Description |
---|
boolean | True if page buttons should be enabled |
Gets the bottom of the touch UI button area in the scene
Returns:
Type | Description |
---|
number | Y Pixel for the cottom coordinate of the button area |
Gets the height of the touch UI button area
Returns:
Type | Description |
---|
number | Height in pixels of the button area |
Gets the top of the touch UI button area in the scene
Returns:
Type | Description |
---|
number | Y Pixel for the top coordinate of the button area |
Gets the Y pixel of the buttons
Returns:
Type | Description |
---|
number | Y Pixel for the top coordinate of the buttons |
Gets the rectangle that represents the buy window's x/y/width/height
Returns:
Type | Description |
---|
Rectangle | The rectangle that represents the buy window |
Determine the shop's price for the item
Returns:
Type | Description |
---|
number | The price of the item when bought |
calcWindowHeight(numLines, selectable)numberinherited
Calculates how many pixels tall a window is
Name | Type | Description |
---|
numLines | number | Amount of text lines in the window |
selectable | boolean | If the window is selectable (or inherits from Window_Selectable) or not |
Returns:
Type | Description |
---|
number | Amount of pixels tall the window is |
Gets the rectangle that represents the category window's x/y/width/height
Returns:
Type | Description |
---|
Rectangle | The rectangle that represents the category window |
Centers a given sprite within the game window
Name | Type | Description |
---|
sprite | Sprite | The sprite to center |
Check if there is a gameover, and go to Scene_Gameover if so
Handling for when the buy command is selected
Handling for when the sell command is selected
Gets the rectangle that represents the command window's x/y/width/height
Returns:
Type | Description |
---|
Rectangle | The rectangle that represents the command window |
Creates the scene
Create the background image for the scene
Creates the Touch UI buttons
Creates the buy window
Creates the cancel button
Creates the category window
Creates the command window
Creates a dummy window. This is used to display an empty window before certain windows are activated
Creates the gold window
Create the scene's help window
Creates the number window
Creates the page up/down buttons
Creates the sell window
Creates the status window
Get the currency unit
Returns:
Type | Description |
---|
string | The currency unit |
Destroys the stage
Processing for a purchase from the shop
Name | Type | Description |
---|
number | number | The number of the item being purchased |
Processing for a sale to the shop
Name | Type | Description |
---|
number | number | The number of the item being sold |
Gets the rectangle that represents the dummy window's x/y/width/height
Returns:
Type | Description |
---|
Rectangle | The rectangle that represents the dummy window |
Processing for the end of number input
Try to autosave the game
Fades out the scene and audio
Default speed for a normal fade
Returns:
Type | Description |
---|
number | Amount of frames to fade |
Gets the rectangle that represents the gold window's x/y/width/height
Returns:
Type | Description |
---|
Rectangle | The rectangle that represents the gold window |
Gets the bottom of the help area
Returns:
Type | Description |
---|
number | Y Pixel for the bottom coordinate of the help area |
Gets the height needed for the help area
Returns:
Type | Description |
---|
number | Number of pixels tall the help area is |
Gets the top of the help area
Returns:
Type | Description |
---|
number | Y Pixel for the top coordinate of the help area |
Get the Rectangle object that provides the help window's x/y/width/height
Returns:
Type | Description |
---|
Rectangle | The rectangle representing the help window |
Initializes the scene
Check if scene is active
Returns:
Type | Description |
---|
boolean | True if the scene is active |
Check if autosaving is enabled
Returns:
Type | Description |
---|
boolean | True if the game can autosave |
Check if touch UI buttons appear on bottom
Returns:
Type | Description |
---|
boolean | True if bottom button mode is enabled |
Check if the help window appears on bottom
Returns:
Type | Description |
---|
boolean | True if bottom help mode is enabled |
Check if scene is busy
Returns:
Type | Description |
---|
boolean | True if the scene is busy |
Check if scene is currently fading the screen
Returns:
Type | Description |
---|
boolean | True if the scene is fading |
Check if scene is ready
Returns:
Type | Description |
---|
boolean | True if the scene is ready |
Check if right input mode is enabled
Returns:
Type | Description |
---|
boolean | True if right input mode is enabled |
Check if scene is started
Returns:
Type | Description |
---|
boolean | True if the scene is started |
Gets the bottom of the main area
Returns:
Type | Description |
---|
number | Y Pixel for the bottom coordinate of the main area |
Gets the total height of the main area in pixels
Returns:
Type | Description |
---|
number | Total height of the main area |
Gets the top of the main area
Returns:
Type | Description |
---|
number | Y Pixel for the top coordinate of the main area |
Get the main command width
Returns:
Type | Description |
---|
number | Width of a main command |
Determine the maximum number of the item the player can buy
Returns:
Type | Description |
---|
number | The maximum number of the item the player can buy |
Determine the maximum number of the item the player can sell
Returns:
Type | Description |
---|
number | The maximum number of the item the player can sell |
Determine the amount of money the player has
Returns:
Type | Description |
---|
number | The money the player has |
Check if the scene should create the cancel button
Returns:
Type | Description |
---|
boolean | True if there should be a cancel button in the scene |
Check if the scene should create the page buttons
Returns:
Type | Description |
---|
boolean | True if there should be page buttons in the scene |
Cycle to the next actor in the menu
Gets the rectangle that represents the number window's x/y/width/height
Returns:
Type | Description |
---|
Rectangle | The rectangle that represents the number window |
Processing for when the scene's actor changes
Processing for when an autosave attempt failed
Processing for when an autosave attempt was successful
Handling for cancel input on the buy window
Handling for OK input on the buy window
Handling for cancel input on the category window
Handling for ok input on the category window
Handling for cancel input on the number window
Handling for ok input on the number window
Handling for cancel input on the sell window
Handling for ok input on the sell window
Pops the scene to return to the previous scene
prepare(goods, purchaseOnly)
Prepare the shop scene variables
Name | Type | Description |
---|
goods | Array | An array of shop good objects |
purchaseOnly | boolean | If the shop only allows buying |
Cycle to the previous actor in the menu
Requests an autosave
Scales a given sprite to fit in the game window
Name | Type | Description |
---|
sprite | Sprite | The sprite to scale |
Gets the rectangle that represents the sell window's x/y/width/height
Returns:
Type | Description |
---|
Rectangle | The rectangle that represents the sell window |
Determine the price the shop will buy the item for
Returns:
Type | Description |
---|
number | The price the shop will buy the item for |
Set the background image opacity
Name | Type | Description |
---|
opacity | number | The opacity to set the background image to |
Default speed for a slow fade
Returns:
Type | Description |
---|
number | Amount of frames to fade |
Starts the scene
Start to fade the scene in
Name | Type | Description |
---|
duration | number | Frames to fade in the scene |
white | boolean | If the fade color is white or not |
Start to fade the scene out
Name | Type | Description |
---|
duration | number | Frames to fade out the scene |
white | boolean | If the fade color is white or not |
Gets the status window's width
Returns:
Type | Description |
---|
number | The width of the status window |
Gets the rectangle that represents the status window's x/y/width/height
Returns:
Type | Description |
---|
Rectangle | The rectangle that represents the status window |
Stops the scene
Terminates the scene
Updates the scene
Sets the actor object of the scene
Updates the scene's children
Updates the scene's fade
Updates the page up / down buttons visibility