CreateBall clones the original ball rather than create new balls.

This commit is contained in:
PlatinumSkink
2015-09-28 18:09:55 +02:00
parent fc41727a5d
commit 7b7277509e
4 changed files with 19 additions and 5 deletions
+5
View File
@@ -9,6 +9,7 @@
#include "Physics/CCircleShape.h"
#include "Physics/EContact.h"
#include "Rendering/CModel.h"
#include "Rendering/CPointLight.h"
#include "Game/CBall.h"
#include "Game/CPowerUp.h"
#include "Game/ELifeLost.h"
@@ -48,6 +49,8 @@ public:
void OnEntityRemoved(EntityID entity) override;
EntityID CreateBall();
EntityID Ball() { return m_Ball; };
void SetBall(const EntityID& ball) { m_Ball = ball; }
float& EdgeX() { return m_EdgeX; }
void SetEdgeX(const float& edgeX) { m_EdgeX = edgeX; }
@@ -73,6 +76,8 @@ private:
bool m_ReplaceBall = false;
bool m_MultiBall = false;
EntityID m_Ball;
dd::EventRelay<BallSystem, dd::Events::LifeLost> m_ELifeLost;
dd::EventRelay<BallSystem, dd::Events::MultiBallLost> m_EMultiBallLost;
dd::EventRelay<BallSystem, dd::Events::ResetBall> m_EResetBall;