2021-09-24 10:15:43 -04:00
|
|
|
#ifndef BLOCKINFO_H__
|
|
|
|
#define BLOCKINFO_H__
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "define.h"
|
|
|
|
|
|
|
|
class BlockInfo
|
|
|
|
{
|
|
|
|
public:
|
2021-10-31 00:31:08 -04:00
|
|
|
BlockInfo(BlockType type, const std::string& name, float u, float v, float s, int dur);
|
2021-09-24 10:15:43 -04:00
|
|
|
~BlockInfo();
|
|
|
|
|
|
|
|
BlockType GetType() const;
|
|
|
|
|
|
|
|
void SetDurability(int durability);
|
|
|
|
int GetDurability() const;
|
|
|
|
|
2021-10-31 00:31:08 -04:00
|
|
|
void GetTexture(float& u, float& v, float& s);
|
2021-10-26 17:28:37 -04:00
|
|
|
|
2021-09-24 10:15:43 -04:00
|
|
|
void Show() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
BlockType m_type;
|
2021-10-31 00:31:08 -04:00
|
|
|
float m_u;
|
|
|
|
float m_v;
|
|
|
|
float m_s;
|
2021-09-24 10:15:43 -04:00
|
|
|
std::string m_name;
|
|
|
|
int m_durability;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BLOCKINFO_H__
|