Merge remote-tracking branch 'origin' into Tobias
This commit is contained in:
@@ -19,7 +19,7 @@ struct Brick : Component
|
||||
//0 = empty, 1 = normal, 2 = multi-brick, 3 = lifebuoy, 4 = sticky, 5 = blaster, 6 = kraken
|
||||
int Type = 0;
|
||||
bool Removed = false;
|
||||
int Number = 0; // For the Kraken to keep track of which bricks needs replacing.
|
||||
int Number = 100; // For the Kraken to keep track of which bricks needs replacing.
|
||||
|
||||
//What number of types each is.
|
||||
const int EmptyBrickSpace = 0;
|
||||
|
||||
@@ -15,7 +15,8 @@ namespace Components
|
||||
|
||||
struct Kraken : Component {
|
||||
|
||||
int Health = 10;
|
||||
int MaxHealth = 30;
|
||||
int Health = MaxHealth;
|
||||
int CurrentAction = 1;
|
||||
|
||||
const int Idle = 1;
|
||||
|
||||
@@ -15,7 +15,8 @@ namespace Events
|
||||
|
||||
struct BrickGenerating : Event
|
||||
{
|
||||
glm::vec3 Origin;
|
||||
glm::vec3 Origin1;
|
||||
glm::vec3 Origin2;
|
||||
int TargetLine;
|
||||
int Set;
|
||||
};
|
||||
|
||||
@@ -17,6 +17,9 @@ struct KrakenHit : Event
|
||||
{
|
||||
EntityID Kraken;
|
||||
EntityID Hitter;
|
||||
int MaxHealth;
|
||||
int CurrentHealth;
|
||||
int NewHealth;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -76,17 +76,17 @@ private:
|
||||
{
|
||||
m_ScoreNumberFrame->SetLeft(Width / 2.f - m_ScoreNumberFrame->Width / 2.f);
|
||||
|
||||
m_ScoreBackMid->SetLeft(m_ScoreNumberFrame->Left());
|
||||
m_ScoreBackMid->Width = m_ScoreNumberFrame->Width;
|
||||
m_ScoreBackMid->Height = m_ScoreNumberFrame->Height + 35;
|
||||
m_ScoreBackMid->SetLeft(m_ScoreNumberFrame->Left() + 4);
|
||||
|
||||
m_ScoreBackLeft->SetRight(m_ScoreBackMid->Left());
|
||||
m_ScoreBackLeft->Width = 40;
|
||||
//m_ScoreBackLeft->Width = 40;
|
||||
m_ScoreBackLeft->Height = m_ScoreBackMid->Height;
|
||||
m_ScoreBackLeft->SetRight(m_ScoreBackMid->Left());
|
||||
|
||||
m_ScoreBackRight->SetLeft(m_ScoreBackMid->Right());
|
||||
m_ScoreBackRight->Width = 40;
|
||||
//m_ScoreBackRight->Width = 40;
|
||||
m_ScoreBackRight->Height = m_ScoreBackMid->Height;
|
||||
m_ScoreBackRight->SetLeft(m_ScoreBackMid->Right());
|
||||
}
|
||||
|
||||
bool OnScore(const Events::ScoreEvent& event)
|
||||
|
||||
@@ -62,12 +62,13 @@ private:
|
||||
bool m_ReturnToIdle = false;
|
||||
EntityID m_KrakenTemplate;
|
||||
std::string m_Action = "Idle";
|
||||
int m_NumberOfActions;
|
||||
float m_KrakenTimer = 0;
|
||||
float m_KrakenSecondsToAction = 1;
|
||||
float m_KrakenSecondsToAction = 10;
|
||||
const int Idle = 1;
|
||||
|
||||
std::array<int, 14> m_Bricks;
|
||||
std::array<int, 14> m_Colors;
|
||||
std::array<int, 42> m_Bricks;
|
||||
std::array<int, 42> m_Colors;
|
||||
|
||||
dd::EventRelay<KrakenSystem, dd::Events::Pause> m_EPause;
|
||||
dd::EventRelay<KrakenSystem, dd::Events::Resume> m_EResume;
|
||||
|
||||
@@ -172,8 +172,12 @@ private:
|
||||
std::array<int, 42> m_Bricks;
|
||||
std::array<glm::vec4, 42> m_Colors;
|
||||
|
||||
std::array<int, 14> m_BrickSet;
|
||||
std::array<glm::vec4, 14> m_ColorSet;
|
||||
std::array<int, 42> m_BrickSet;
|
||||
std::array<glm::vec4, 42> m_ColorSet;
|
||||
std::array<bool, 42> m_KrakenBricks;
|
||||
|
||||
bool m_BrickGenerating = false;
|
||||
dd::Events::BrickGenerating m_BrickGeneratingEvent;
|
||||
|
||||
dd::EventRelay<LevelSystem, dd::Events::Contact> m_EContact;
|
||||
dd::EventRelay<LevelSystem, dd::Events::ScoreEvent> m_EScoreEvent;
|
||||
@@ -201,6 +205,7 @@ private:
|
||||
bool OnResume(const dd::Events::Resume &event);
|
||||
bool OnHitPad(const dd::Events::HitPad &event);
|
||||
bool OnBrickGenerating(const dd::Events::BrickGenerating &event);
|
||||
bool BrickGenerating(const dd::Events::BrickGenerating &event);
|
||||
void GetBrickSet(int Set);
|
||||
bool OnKrakenDefeated(const dd::Events::KrakenDefeated &event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user