Revert "Indentation style changed to Horstmann"
This reverts commit f2259f712d.
Conflicts:
src/GameWorld.cpp
src/Systems/PhysicsSystem.cpp
This commit is contained in:
+20
-11
@@ -2,9 +2,11 @@
|
||||
#include "GameWorld.h"
|
||||
|
||||
void GameWorld::Initialize()
|
||||
{ World::Initialize();
|
||||
{
|
||||
World::Initialize();
|
||||
|
||||
{ auto camera = CreateEntity();
|
||||
{
|
||||
auto camera = CreateEntity();
|
||||
auto transform = AddComponent<Components::Transform>(camera, "Transform");
|
||||
transform->Position.z = 20.f;
|
||||
transform->Position.y = 20.f;
|
||||
@@ -15,7 +17,8 @@ void GameWorld::Initialize()
|
||||
auto freeSteering = AddComponent<Components::FreeSteering>(camera, "FreeSteering");
|
||||
}
|
||||
|
||||
{ auto terrain = CreateEntity();
|
||||
{
|
||||
auto terrain = CreateEntity();
|
||||
auto transform = AddComponent<Components::Transform>(terrain, "Transform");
|
||||
transform->Position = glm::vec3(0, -5, 0);
|
||||
transform->Scale = glm::vec3(1000.0f, 1, 1000.0f);
|
||||
@@ -37,7 +40,8 @@ void GameWorld::Initialize()
|
||||
|
||||
|
||||
for (int i = 0; i < 1; i++)
|
||||
{ auto entity = CreateEntity();
|
||||
{
|
||||
auto entity = CreateEntity();
|
||||
auto transform = AddComponent<Components::Transform>(entity, "Transform");
|
||||
transform->Scale = glm::vec3(1.0f);
|
||||
transform->Position = glm::vec3(0, 10+i, 0);
|
||||
@@ -53,8 +57,8 @@ void GameWorld::Initialize()
|
||||
box->Depth = 0.5;
|
||||
|
||||
|
||||
{ auto entity1 = CreateEntity();
|
||||
|
||||
{
|
||||
auto entity1 = CreateEntity();
|
||||
|
||||
|
||||
auto transform = AddComponent<Components::Transform>(entity1, "Transform");
|
||||
@@ -90,7 +94,8 @@ void GameWorld::Initialize()
|
||||
|
||||
}
|
||||
|
||||
{ auto entity = CreateEntity();
|
||||
{
|
||||
auto entity = CreateEntity();
|
||||
AddComponent(entity, "Transform");
|
||||
auto emitter = AddComponent<Components::SoundEmitter>(entity, "SoundEmitter");
|
||||
emitter->Path = "Sounds/korvring.wav";
|
||||
@@ -102,11 +107,13 @@ void GameWorld::Initialize()
|
||||
}
|
||||
|
||||
void GameWorld::Update(double dt)
|
||||
{ World::Update(dt);
|
||||
{
|
||||
World::Update(dt);
|
||||
}
|
||||
|
||||
void GameWorld::RegisterComponents()
|
||||
{ m_ComponentFactory.Register("Bounds", []() { return new Components::Bounds(); });
|
||||
{
|
||||
m_ComponentFactory.Register("Bounds", []() { return new Components::Bounds(); });
|
||||
m_ComponentFactory.Register("Camera", []() { return new Components::Camera(); });
|
||||
m_ComponentFactory.Register("Collision", []() { return new Components::Collision(); });
|
||||
m_ComponentFactory.Register("DirectionalLight", []() { return new Components::DirectionalLight(); });
|
||||
@@ -134,7 +141,8 @@ void GameWorld::RegisterComponents()
|
||||
}
|
||||
|
||||
void GameWorld::RegisterSystems()
|
||||
{ m_SystemFactory.Register("TransformSystem", [this]() { return new Systems::TransformSystem(this); });
|
||||
{
|
||||
m_SystemFactory.Register("TransformSystem", [this]() { return new Systems::TransformSystem(this); });
|
||||
//m_SystemFactory.Register("LevelGenerationSystem", [this]() { return new Systems::LevelGenerationSystem(this); });
|
||||
m_SystemFactory.Register("InputSystem", [this]() { return new Systems::InputSystem(this, m_Renderer); });
|
||||
//m_SystemFactory.Register("CollisionSystem", [this]() { return new Systems::CollisionSystem(this); });
|
||||
@@ -151,7 +159,8 @@ void GameWorld::RegisterSystems()
|
||||
}
|
||||
|
||||
void GameWorld::AddSystems()
|
||||
{ AddSystem("TransformSystem");
|
||||
{
|
||||
AddSystem("TransformSystem");
|
||||
//AddSystem("LevelGenerationSystem");
|
||||
AddSystem("InputSystem");
|
||||
//AddSystem("CollisionSystem");
|
||||
|
||||
Reference in New Issue
Block a user