Roguelike
 All Classes Namespaces Functions Variables Typedefs Friends Pages
Public Member Functions | List of all members
Misc Class Reference

#include <item.h>

Inheritance diagram for Misc:
Item

Public Member Functions

 Misc (int _rarity, int _weight, Tile _sprite, std::string _name, IntPoint _coords)
 
 Misc (IntPoint _coords, MiscType misc)
 
void perform_action ()
 
- Public Member Functions inherited from Item
 Item (IntPoint _coords)
 
 Item (int _rarity, int _weight, Tile _sprite, std::string _name, IntPoint _coords)
 
int get_weight ()
 
Tileget_sprite ()
 
IntPoint get_coords ()
 
void set_coords (IntPoint _c)
 
std::string get_name ()
 
int get_rarity ()
 
std::string get_description ()
 
int get_size ()
 

Additional Inherited Members

- Public Attributes inherited from Item
bool can_equip
 
bool can_use
 
bool can_wield
 
bool can_consume
 
- Protected Attributes inherited from Item
std::string name
 
std::string description
 
int weight
 
IntPoint coords
 
Tile sprite
 
int rarity
 
int size
 

Detailed Description

Class for creating misc items. Misc items are items that don't fall into any other categor and generally don't do anything.

See also
MiscType

Constructor & Destructor Documentation

Misc::Misc ( int  _rarity,
int  _weight,
Tile  _sprite,
std::string  _name,
IntPoint  _coords 
)

The constructor for misc items.

Parameters
_raritySets the rarity of the misc item.
_weightSets the weight of the misc item.
_spriteSets the sprite for the misc item.
_nameSets the name of the misc item.
_coordsSets the coordinates of the misc item.
Misc::Misc ( IntPoint  _coords,
MiscType  misc 
)

Constructor for the misc item. This is the normally used constructor, relying on the defined MiscType and taking a set of coordinates.

Parameters
_coordsSets the coordinates of the misc item.
miscThe template for the misc item.

Member Function Documentation

void Misc::perform_action ( )
virtual

For performaing an action.

See also
Item::perform_action()

Implements Item.


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