MATTIE.itemAPI

The api for interacting with items

Classes

RunTimeItem

RuntimeIcon

Methods

static createCostume(charName, startingIndex, costumeName, costumeIconId, unlockItem, craftingItems, spawn)

Parameters:
Name Type Description
charName string

the name of the character spritesheet within www/img/characters that this is a costume of (do not include .png)

startingIndex int

the index within that spritesheet IE: what portion of the sprite sheet to use if it contains multiple chars
(0 if only one char in the sheet)

costumeName string

the name of the item

costumeIconId int

the id of the icon that this costume should have.

unlockItem int

the id of the item that should unlock the crafting recipe for this costume

craftingItems Array.<int>

an array of the items needed to craft this item

spawn boolean

should this spawn the item or just return it so that you can modify it farther before spawning

static quickBook(name, desc, iconName, bookOpenText, spawn)

Parameters:
Name Type Description
name *

name of the book

desc *

description

iconName *

the name of the icon in the system folder

bookOpenText *

the text to display when the book is red

spawn *

whether to spawn the book or not

Returns:
-

the book obj