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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user