Represent the player's Inventory.
Implemented as a singleton in the session.
package |
inc\Inventory.inc |
---|---|
author |
Alexandre Renoux |
author |
Pierre-Emmanuel Novac |
_addItem(\Item $item) : array
_removeItem(\Item $item) : void
_useItem(\Item $item) : array|false
array|false
Item and updated Item's count, false if it was not found
addItem(\Item $item) : array
addToXML(\SimpleXMLElement $root) : void
\SimpleXMLElement
root XML element to add the Inventory's Items to
created() : boolean
boolean
true if Inventory was already created, false otherwise
get() : \Inventory
removeItem(\Item $item) : void
sendContent() : array
array
array of Items and number
useItem(\Item $item) : array|false
array|false
Item and updated Item's count, false if it was not found
items : array
var |
Arrays of array with Item object and Item's count as int |
---|
array