Direct damage and VulnerableToSplash flag on Health component
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#ifndef Components_DamageModel_h__
|
||||
#define Components_DamageModel_h__
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct DamageModel : Component
|
||||
{
|
||||
DamageModel()
|
||||
: Color(glm::vec4(1.0f, 1.0f, 1.0f, 1.0f))
|
||||
, ShadowCaster(true)
|
||||
, Transparent(false)
|
||||
{ }
|
||||
std::string ModelFile;
|
||||
glm::vec4 Color;
|
||||
bool ShadowCaster;
|
||||
bool Transparent;
|
||||
|
||||
virtual DamageModel* Clone() const override { return new DamageModel(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
#endif // !Components_DamageModel_h__
|
||||
@@ -9,9 +9,12 @@ namespace Components
|
||||
struct Health : Component
|
||||
{
|
||||
Health()
|
||||
: Amount(1.0f) { }
|
||||
: Amount(1.0f)
|
||||
, VulnerableToSplash(true)
|
||||
{ }
|
||||
|
||||
float Amount;
|
||||
bool VulnerableToSplash;
|
||||
|
||||
virtual Health* Clone() const override { return new Health(*this); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user