thelandofwildblocs/CPP/blockinfo.cpp
thatscringebro 9dfd911bff Init
2023-02-16 09:26:40 -05:00

58 lines
913 B
C++
Executable File

#include "../H/blockinfo.h"
#include <iostream>
BlockInfo::BlockInfo(BlockType type, const std::string& name) : m_type(type), m_name(name), m_durability(1)
{
}
BlockInfo::BlockInfo()
{
}
BlockInfo::~BlockInfo()
{
}
BlockType BlockInfo::GetType() const
{
return m_type;
}
void BlockInfo::SetDurability(int durability)
{
m_durability = durability;
}
int BlockInfo::GetDurability() const
{
return m_durability;
}
void BlockInfo::SetUVWH(float u, float v, float w, float h){
m_u = u;
m_v = v;
m_w = w;
m_h = h;
}
float BlockInfo::GetU(){
return m_u;
}
float BlockInfo::GetV(){
return m_v;
}
float BlockInfo::GetW(){
return m_w;
}
float BlockInfo::GetH(){
return m_h;
}
void BlockInfo::Show() const
{
std::cout << "Type: " << m_type << std::endl;
std::cout << "Nom: " << m_name << std::endl;
std::cout << "Durabilite: " << m_durability << std::endl;
}