WIP shoot

This commit is contained in:
2016-01-24 17:16:18 +01:00
parent 3261e21d96
commit 235b26ad61
10 changed files with 93 additions and 48 deletions
+3 -3
View File
@@ -2,15 +2,15 @@
#define EPlayerDamage_h__
#include "EventBroker.h"
#include "../Core/Entity.h"
#include "../Core/EntityWrapper.h"
namespace Events
{
struct PlayerDamage : Event
{
double DamageAmount;
EntityID PlayerDamagedID;
EntityWrapper Player;
double Damage;
};
}
+2 -4
View File
@@ -2,16 +2,14 @@
#define EShoot_h__
#include "EventBroker.h"
#include "../Core/Entity.h"
#include "Engine/GLM.h"
#include "../Core/EntityWrapper.h"
namespace Events
{
struct Shoot : Event
{
//ID for who made the shot
EntityID shooter;
EntityWrapper Player;
};
}
+2 -1
View File
@@ -23,9 +23,10 @@ struct EntityWrapper
static const EntityWrapper Invalid;
bool HasComponent(const std::string& componentName);
bool HasComponent(const std::string& componentType);
EntityWrapper Parent();
EntityWrapper FirstChildByName(const std::string& name);
EntityWrapper FirstParentWithComponent(const std::string& componentType);
bool IsChildOf(EntityWrapper potentialParent);
bool Valid();