Merge branch 'master' into Sound
Conflicts: src/game/Game/BallSystem.cpp
This commit is contained in:
+10
-10
@@ -1,6 +1,8 @@
|
||||
#ifndef DAYDREAM_BALLSYSTEM_H
|
||||
#define DAYDREAM_BALLSYSTEM_H
|
||||
|
||||
#include <random>
|
||||
|
||||
#include "Core/System.h"
|
||||
#include "Core/World.h"
|
||||
#include "Core/EventBroker.h"
|
||||
@@ -8,14 +10,17 @@
|
||||
#include "Core/CTemplate.h"
|
||||
#include "Core/ResourceManager.h"
|
||||
#include "Core/ConfigFile.h"
|
||||
|
||||
#include "Physics/CPhysics.h"
|
||||
#include "Physics/CCircleShape.h"
|
||||
#include "Physics/CRectangleShape.h"
|
||||
#include "Physics/EContact.h"
|
||||
|
||||
#include "Rendering/CModel.h"
|
||||
#include "Rendering/CSprite.h"
|
||||
#include "Rendering/CPointLight.h"
|
||||
#include "Rendering/CAnimation.h"
|
||||
|
||||
#include "Game/CBall.h"
|
||||
#include "Game/CPowerUp.h"
|
||||
#include "Game/CLife.h"
|
||||
@@ -41,6 +46,7 @@
|
||||
#include "Game/EHitLag.h"
|
||||
#include "Game/EActionButton.h"
|
||||
#include "Game/ELifebuoyHit.h"
|
||||
|
||||
#include "Physics/ECreateParticleSequence.h"
|
||||
#include "Sound/CCollisionSound.h"
|
||||
#include "Sound/EPlaySound.h"
|
||||
@@ -78,7 +84,6 @@ public:
|
||||
void OnEntityRemoved(EntityID entity) override;
|
||||
|
||||
EntityID CreateBall();
|
||||
void CreateLife(int);
|
||||
EntityID Ball() { return m_Ball; };
|
||||
void SetBall(const EntityID& ball) { m_Ball = ball; }
|
||||
|
||||
@@ -90,22 +95,18 @@ public:
|
||||
void SetEdgeY(const float& edgeY) { m_EdgeY = edgeY; }
|
||||
int& MultiBalls() { return m_MultiBalls; }
|
||||
void SetMultiBalls(const int& multiBalls) { m_MultiBalls = multiBalls; }
|
||||
int& Lives() { return m_Lives; }
|
||||
void SetLives(const int& lives) { m_Lives = lives; }
|
||||
int& PastLives() { return m_PastLives; }
|
||||
void SetPastLives(const int& pastLives) { m_PastLives = pastLives; }
|
||||
bool ReplaceBall() const { return m_ReplaceBall; }
|
||||
void SetReplaceBall(const bool& replaceBall) { m_ReplaceBall = replaceBall; }
|
||||
bool IsPaused() const { return m_Pause; }
|
||||
void SetPause(const bool& pause) { m_Pause = pause; }
|
||||
|
||||
private:
|
||||
std::mt19937 m_RandomGenerator;
|
||||
|
||||
float m_XMovementMultiplier = 2.f;
|
||||
float m_EdgeX = 3.4f; //Actually 3.2, but anyways.
|
||||
float m_EdgeY = 5.2f;
|
||||
int m_MultiBalls = 0;
|
||||
int m_Lives = 3;
|
||||
int m_PastLives = 3;
|
||||
bool m_ReplaceBall = false;
|
||||
bool m_Pause = false;
|
||||
bool m_Waiting = true;
|
||||
@@ -117,7 +118,8 @@ private:
|
||||
double m_KrakenCharge = 0;
|
||||
bool m_Restarting = false;
|
||||
int m_StickyCounter = 3;
|
||||
bool m_GodMode = false;
|
||||
|
||||
bool m_First = true;
|
||||
|
||||
bool m_StageBlockedWaiting = false;
|
||||
|
||||
@@ -129,7 +131,6 @@ private:
|
||||
std::unordered_map<EntityID, std::list<glm::vec2>> m_Contacts;
|
||||
void ResolveContacts();
|
||||
|
||||
dd::EventRelay<BallSystem, dd::Events::LifeLost> m_ELifeLost;
|
||||
dd::EventRelay<BallSystem, dd::Events::MultiBallLost> m_EMultiBallLost;
|
||||
dd::EventRelay<BallSystem, dd::Events::ResetBall> m_EResetBall;
|
||||
dd::EventRelay<BallSystem, dd::Events::MultiBall> m_EMultiBall;
|
||||
@@ -146,7 +147,6 @@ private:
|
||||
dd::EventRelay<BallSystem, dd::Events::ArrivedAtNewStage> m_EArrivedAtNewStage;
|
||||
|
||||
bool Contact(const Events::Contact &event);
|
||||
bool OnLifeLost(const dd::Events::LifeLost &event);
|
||||
bool OnMultiBallLost(const dd::Events::MultiBallLost &event);
|
||||
bool OnResetBall(const dd::Events::ResetBall &event);
|
||||
bool OnMultiBall(const dd::Events::MultiBall &event);
|
||||
|
||||
Reference in New Issue
Block a user