Defines an object that can be contained within components and systems that operate on collectible items, such as Inventory.
More...
|
| Collectable (string name, string tag, int initialCount) |
| Initializes a new instance of the T:MB2D.Collectable class. More...
|
|
void | Consume (int amount=1) |
| Consumes a number of instances of the item More...
|
|
void | Add (int amount=1) |
| Adds a number of instances of this item to the container More...
|
|
abstract void | Effect (Entity entity) |
| The action to enact when the item is consumed or used More...
|
|
|
string | Name [get] |
| Gets the name of the item. More...
|
|
string | Tag [get] |
| Gets the items tag. More...
|
|
int | Count [get] |
| Gets the count of available instances of the item. More...
|
|
Defines an object that can be contained within components and systems that operate on collectible items, such as Inventory.
§ Collectable()
MB2D.Collectable.Collectable |
( |
string |
name, |
|
|
string |
tag, |
|
|
int |
initialCount |
|
) |
| |
|
inline |
Initializes a new instance of the T:MB2D.Collectable class.
- Parameters
-
name | Name to give to the item. |
tag | Short tag to give to the item. |
initialCount | Initial count to add to the container. |
§ Add()
void MB2D.Collectable.Add |
( |
int |
amount = 1 | ) |
|
|
inline |
Adds a number of instances of this item to the container
- Parameters
-
§ Consume()
void MB2D.Collectable.Consume |
( |
int |
amount = 1 | ) |
|
|
inline |
Consumes a number of instances of the item
- Parameters
-
§ Effect()
abstract void MB2D.Collectable.Effect |
( |
Entity |
entity | ) |
|
|
pure virtual |
The action to enact when the item is consumed or used
- Parameters
-
entity | Entity to operate on. |
Implemented in MidnightBlue.Fuel.
§ Count
int MB2D.Collectable.Count |
|
get |
Gets the count of available instances of the item.
The count.
§ Name
string MB2D.Collectable.Name |
|
get |
Gets the name of the item.
The name.
§ Tag
string MB2D.Collectable.Tag |
|
get |
Gets the items tag.
The tag.
The documentation for this class was generated from the following file:
- MB2D/src/Inventory/Collectable.cs