PickupSpawnSystem now spawns a new HealthPickup after the respawnTimer is up. Added HealthPickup.xml entity. Event PickupSpawned now gets published when a new HealthPickup spawns. Player now gains health as he picks up the HealthPickup.

This commit is contained in:
verysecrethero
2016-02-05 15:15:04 +01:00
parent 6a23a987b3
commit fe6fd0bbe3
13 changed files with 368 additions and 35 deletions
+16
View File
@@ -9,9 +9,25 @@
#include "Rendering/ESetCamera.h"
#include "Core/ConfigFile.h"
#include "Core/EPickupSpawned.h"
#include "Core/EPlayerHealthPickup.h";
#include "Engine/Collision/ETrigger.h"
#include "Common.h"
#include <tuple>
class PickupSpawnSystem : public ImpureSystem
{
public:
PickupSpawnSystem(World* world, EventBroker* eventBroker);
virtual void Update(double dt) override;
private:
EventRelay<PickupSpawnSystem, Events::TriggerTouch> m_ETriggerTouch;
bool OnTriggerTouch(Events::TriggerTouch& e);
std::vector<std::tuple<glm::vec3,double>> m_ETriggerTouchVector;
};
#endif