Merge branch 'master' of github.com:teamfisk/AgileBreakOut

This commit is contained in:
tleety
2015-10-12 16:53:08 +02:00
16 changed files with 286 additions and 12 deletions
+13 -1
View File
@@ -31,14 +31,15 @@
//TODO: Remove includes that are only here for the temporary draw solution.
#include "World.h"
#include "CTransform.h"
#include "CTemplate.h"
#include "Core/EventBroker.h"
#include "Rendering/CModel.h"
#include "Rendering/CSprite.h"
#include "CTemplate.h"
#include "Rendering/CPointLight.h"
#include "Transform/TransformSystem.h"
#include "Sound/SoundSystem.h"
#include "Sound/CCollisionSound.h"
#include "Game/LevelSystem.h"
#include "Game/PadSystem.h"
#include "Game/CBall.h"
@@ -46,12 +47,15 @@
#include "Game/CLifebuoy.h"
#include "Game/CProjectile.h"
#include "Game/CBrick.h"
#include "Game/CStickyAim.h"
#include "Game/BallSystem.h"
#include "Game/HitLagSystem.h"
#include "Game/LifebuoySystem.h"
#include "Game/ProjectileSystem.h"
#include "Game/Bricks/CPowerUpBrick.h"
#include "Game/BrickComponents.h"
#include "Physics/PhysicsSystem.h"
#include "Physics/CPhysics.h"
#include "Physics/CRectangleShape.h"
@@ -116,10 +120,18 @@ public:
m_World->ComponentFactory.Register<Components::Life>();
m_World->ComponentFactory.Register<Components::Lifebuoy>();
m_World->ComponentFactory.Register<Components::Projectile>();
m_World->ComponentFactory.Register<Components::StickyAim>();
m_World->ComponentFactory.Register<Components::PowerUp>();
m_World->ComponentFactory.Register<Components::PowerUpBrick>();
m_World->ComponentFactory.Register<Components::StandardBrick>();
m_World->ComponentFactory.Register<Components::MultiBallBrick>();
m_World->ComponentFactory.Register<Components::LifebuoyBrick>();
m_World->ComponentFactory.Register<Components::StickyBrick>();
m_World->ComponentFactory.Register<Components::InkBlasterBrick>();
m_World->ComponentFactory.Register<Components::KrakenAttackBrick>();
m_World->SystemFactory.Register<Systems::LevelSystem>(
[this]() { return new Systems::LevelSystem(m_World.get(), m_EventBroker); });
m_World->AddSystem<Systems::LevelSystem>();
+1
View File
@@ -11,6 +11,7 @@
#include "Physics/CRectangleShape.h"
#include "Physics/EContact.h"
#include "Rendering/CModel.h"
#include "Rendering/CSprite.h"
#include "Rendering/CPointLight.h"
#include "Game/CBall.h"
#include "Game/CPowerUp.h"
+15
View File
@@ -0,0 +1,15 @@
//
// Created by Adniklastrator on 2015-10-12.
//
#ifndef DAYDREAM_CBRICKCOMPONENTS_H
#define DAYDREAM_CBRICKCOMPONENTS_H
#include "Game/CStandardBrick.h"
#include "Game/CMultiBallBrick.h"
#include "Game/CLifebuoyBrick.h"
#include "Game/CStickyBrick.h"
#include "Game/CInkBlasterBrick.h"
#include "Game/CKrakenAttackBrick.h"
#endif //DAYDREAM_CBRICKCOMPONENTS_H
+9
View File
@@ -19,6 +19,15 @@ struct Brick : Component
//0 = empty, 1 = normal, 2 = multi-brick, 3 = lifebuoy, 4 = sticky, 5 = blaster, 6 = kraken
int Type = 0;
bool Removed = false;
//What number of types each is.
const int EmptyBrickSpace = 0;
const int StandardBrick = 1;
const int MultiBallBrick = 2;
const int LifebuoyBrick = 3;
const int StickyBrick = 4;
const int InkBlasterBrick = 5;
const int KrakenAttackBrick = 6;
};
}
+25
View File
@@ -0,0 +1,25 @@
//
// Created by Adniklastrator on 2015-10-12.
//
#ifndef DAYDREAM_CINKBLASTERBRICK_H
#define DAYDREAM_CINKBLASTERBRICK_H
#include "Core/Component.h"
namespace dd
{
namespace Components
{
struct InkBlasterBrick : Component
{
};
}
}
#endif //DAYDREAM_CINKBLASTERBRICK_H
+25
View File
@@ -0,0 +1,25 @@
//
// Created by Adniklastrator on 2015-10-12.
//
#ifndef DAYDREAM_CKRAKENATTACKBRICK_H
#define DAYDREAM_CKRAKENATTACKBRICK_H
#include "Core/Component.h"
namespace dd
{
namespace Components
{
struct KrakenAttackBrick : Component
{
};
}
}
#endif //DAYDREAM_CKRAKENATTACKBRICK_H
+25
View File
@@ -0,0 +1,25 @@
//
// Created by Adniklastrator on 2015-10-12.
//
#ifndef DAYDREAM_CLIFEBUOYBRICK_H
#define DAYDREAM_CLIFEBUOYBRICK_H
#include "Core/Component.h"
namespace dd
{
namespace Components
{
struct LifebuoyBrick : Component
{
};
}
}
#endif //DAYDREAM_CLIFEBUOYBRICK_H
+25
View File
@@ -0,0 +1,25 @@
//
// Created by Adniklastrator on 2015-10-12.
//
#ifndef DAYDREAM_CMULTIBALLBRICK_H
#define DAYDREAM_CMULTIBALLBRICK_H
#include "Core/Component.h"
namespace dd
{
namespace Components
{
struct MultiBallBrick : Component
{
};
}
}
#endif //DAYDREAM_CMULTIBALLBRICK_H
+25
View File
@@ -0,0 +1,25 @@
//
// Created by Adniklastrator on 2015-10-12.
//
#ifndef DAYDREAM_CSTANDARDBRICK_H
#define DAYDREAM_CSTANDARDBRICK_H
#include "Core/Component.h"
namespace dd
{
namespace Components
{
struct StandardBrick : Component
{
};
}
}
#endif //DAYDREAM_CSTANDARDBRICK_H
+25
View File
@@ -0,0 +1,25 @@
//
// Created by Adniklastrator on 2015-10-12.
//
#ifndef DAYDREAM_CSTICKYAIM_H
#define DAYDREAM_CSTICKYAIM_H
#include "Core/Component.h"
namespace dd
{
namespace Components
{
struct StickyAim : Component
{
bool Aiming = false;
};
}
}
#endif //DAYDREAM_CSTICKYAIM_H
+25
View File
@@ -0,0 +1,25 @@
//
// Created by Adniklastrator on 2015-10-12.
//
#ifndef DAYDREAM_CSTICKYBRICK_H
#define DAYDREAM_CSTICKYBRICK_H
#include "Core/Component.h"
namespace dd
{
namespace Components
{
struct StickyBrick : Component
{
};
}
}
#endif //DAYDREAM_CSTICKYBRICK_H
+5 -1
View File
@@ -12,11 +12,15 @@
#include "Core/World.h"
#include "Rendering/CSprite.h"
#include "Rendering/CModel.h"
#include "Game/CBrick.h"
#include "Game/CBall.h"
#include "Game/CLife.h"
#include "Game/CProjectile.h"
#include "Game/CPowerUp.h"
#include "Game/BrickComponents.h"
#include "Game/EStageCleared.h"
#include "Game/ELifeLost.h"
#include "Game/EResetBall.h"
@@ -34,7 +38,7 @@
#include "Game/EClusterClear.h"
#include "Game/ECreatePowerUp.h"
#include "Game/EPowerUpTaken.h"
//#include "Game/Bricks/CPowerUpBrick.h"
#include "Physics/CPhysics.h"
#include "Physics/CCircleShape.h"
#include "Physics/CRectangleShape.h"
+8
View File
@@ -24,8 +24,11 @@
#include "Game/CBall.h"
#include "Game/CPad.h"
#include "Game/CPowerUp.h"
#include "Game/CStickyAim.h"
#include "Game/EResetBall.h"
#include "Game/EMultiBall.h"
#include "Game/EStickyPad.h"
#include "Game/EInkBlaster.h"
#include "Game/EKrakenAttack.h"
#include "Game/EPowerUpTaken.h"
#include "Game/EStageCleared.h"
@@ -78,12 +81,15 @@ private:
bool m_ReplaceBall = false;
bool m_MultiBall = false;
bool m_KrakenAttack = false;
bool m_BallStuck = false;
double m_KrakenCharge = 0;
double m_KrakenStrength = 0;
double m_PlayerStrength = 0;
float m_Edge = 2.8f;
Components::Transform* m_Transform = nullptr;
Components::Pad* m_Pad = nullptr;
std::shared_ptr<Components::Transform> m_StickTransform;
std::shared_ptr<Components::StickyAim> m_StickyAim;
bool m_Pause = false;
@@ -94,6 +100,7 @@ private:
dd::EventRelay<PadSystem, dd::Events::StageCleared> m_EStageCleared;
dd::EventRelay<PadSystem, dd::Events::Pause> m_EPause;
dd::EventRelay<PadSystem, dd::Events::KrakenAttack> m_EKrakenAttack;
dd::EventRelay<PadSystem, dd::Events::StickyPad> m_EStickyPad;
dd::EventRelay<PadSystem, dd::Events::ActionButton> m_EActionButton;
bool OnKeyDown(const dd::Events::KeyDown &event);
@@ -103,6 +110,7 @@ private:
bool OnStageCleared(const dd::Events::StageCleared &event);
bool OnPause(const dd::Events::Pause &event);
bool OnKrakenAttack(const dd::Events::KrakenAttack &event);
bool OnStickyPad(const dd::Events::StickyPad &event);
bool OnActionButton(const dd::Events::ActionButton &event);
class PadSteeringInputController;