Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | Public Attributes | List of all members
core::map::Item Struct Reference

Basic struct representing a pickup-able item in Map. More...

#include <Item.hpp>

Public Member Functions

 Item ()
 Makes an empty item. More...
 
 Item (std::uint16_t id, std::uint16_t mapId, const sf::Vector2i &pos, std::uint8_t level, bool visible)
 Makes an item from the given parameters. More...
 

Public Attributes

std::uint16_t id
 
std::uint16_t mapId
 
sf::Vector2i position
 
std::uint8_t level
 
bool visible
 

Detailed Description

Basic struct representing a pickup-able item in Map.

Definition at line 16 of file Item.hpp.

Constructor & Destructor Documentation

◆ Item() [1/2]

core::map::Item::Item ( )

Makes an empty item.

Definition at line 7 of file Item.cpp.

◆ Item() [2/2]

core::map::Item::Item ( std::uint16_t  id,
std::uint16_t  mapId,
const sf::Vector2i &  pos,
std::uint8_t  level,
bool  visible 
)

Makes an item from the given parameters.

Parameters
idThe id of the item that gets added to the bag
mapIdA map unique id to avoid spawning picked up items
posThe position of the item, in tiles
levelThe level the item is on
visibleTrue to render the item, false to hide

Definition at line 13 of file Item.cpp.

Member Data Documentation

◆ id

std::uint16_t core::map::Item::id

Definition at line 17 of file Item.hpp.

◆ level

std::uint8_t core::map::Item::level

Definition at line 20 of file Item.hpp.

◆ mapId

std::uint16_t core::map::Item::mapId

Definition at line 18 of file Item.hpp.

◆ position

sf::Vector2i core::map::Item::position

Definition at line 19 of file Item.hpp.

◆ visible

bool core::map::Item::visible

Definition at line 21 of file Item.hpp.


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