Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.EquipmentData Class Reference

Stores data about what the player has equipped. Equipped items are quite like inventory items so we extend that class. More...

Inheritance diagram for PlatformerPro.EquipmentData:
PlatformerPro.ItemInstanceData

Public Member Functions

 EquipmentData ()
 Initializes a new instance of the PlatformerPro.EquipmentData class. More...
 
 EquipmentData (ItemInstanceData data)
 Initializes a new instance of the PlatformerPro.EquipmentData class. More...
 
- Public Member Functions inherited from PlatformerPro.ItemInstanceData
 ItemInstanceData ()
 Initializes a new instance of the PlatformerPro.ItemInstanceData class. More...
 
 ItemInstanceData (ItemInstanceData source)
 Initializes a new instance of the PlatformerPro.ItemInstanceData class by cloning another one then updating the amount. More...
 
 ItemInstanceData (string itemId, int amount)
 Initializes a new instance of the PlatformerPro.ItemInstanceData class. More...
 
virtual int Damage (int amount)
 Damage the item by the specified amount and return amount of damage done, or -1 if item destroyed. More...
 
virtual void RepairToMax ()
 Repairs an item so its durability goes back to max. More...
 
virtual void Repair (int amount)
 Repairs an item so its durability goes back to max. More...
 

Public Attributes

string slot
 The slot the item is in. More...
 
- Public Attributes inherited from PlatformerPro.ItemInstanceData
int amount
 Amount stored in the inventory. More...
 
int durability
 Amount of durability (health) remaining. Durability starts at max durability and is reduced as an item is Damaged. More...
 
int xp
 Store experience against this object. Can be used to allow items to level up. More...
 

Additional Inherited Members

- Protected Attributes inherited from PlatformerPro.ItemInstanceData
string itemId
 Id of the item. More...
 
ItemTypeData data
 Cache item data, we need this a lot. More...
 
- Properties inherited from PlatformerPro.ItemInstanceData
string ItemId [get, set]
 
ItemTypeData Data [get]
 Gets the ItemTypeData backing this item. More...
 

Detailed Description

Stores data about what the player has equipped. Equipped items are quite like inventory items so we extend that class.

Constructor & Destructor Documentation

◆ EquipmentData() [1/2]

PlatformerPro.EquipmentData.EquipmentData ( )

Initializes a new instance of the PlatformerPro.EquipmentData class.

◆ EquipmentData() [2/2]

PlatformerPro.EquipmentData.EquipmentData ( ItemInstanceData  data)

Initializes a new instance of the PlatformerPro.EquipmentData class.

Parameters
dataData.

Member Data Documentation

◆ slot

string PlatformerPro.EquipmentData.slot

The slot the item is in.


The documentation for this class was generated from the following file: