25 lines
345 B
C++
25 lines
345 B
C++
|
|
/**
|
||
|
|
* @file common.hpp
|
||
|
|
* @brief Common/utility components
|
||
|
|
*/
|
||
|
|
|
||
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
|
||
|
|
struct Name {
|
||
|
|
std::string value;
|
||
|
|
};
|
||
|
|
|
||
|
|
// Tag component - empty struct marks entities for destruction
|
||
|
|
struct ToDestroy {};
|
||
|
|
|
||
|
|
struct Lifetime {
|
||
|
|
float remaining = 0.0f;
|
||
|
|
};
|
||
|
|
|
||
|
|
struct Health {
|
||
|
|
float current = 100.0f;
|
||
|
|
float max = 100.0f;
|
||
|
|
};
|