Created CPad and PadSystem. Doesn't do very much.

This commit is contained in:
PlatinumSkink
2015-09-10 16:40:49 +02:00
parent 2041640441
commit 84577cb2c8
8 changed files with 161 additions and 49 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ set(SOURCE_FILES
${SOURCE_FILES_Rendering}
${SOURCE_FILES_Transform}
${SOURCE_FILES_Game}
../../include/Game/CBrick.h ../../include/Game/EStageCleared.h)
../../include/Game/CBrick.h ../../include/Game/EStageCleared.h ../../include/Game/CPad.h Game/PadSystem.cpp ../../include/Game/PadSystem.h)
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
+6 -4
View File
@@ -4,14 +4,15 @@
#include "PrecompiledHeader.h"
#include "Game/CBrick.h"
#include "Game/LevelSystem.h"
#include "Core/World.h"
#include "Game/EStageCleared.h"
void dd::Systems::LevelSystem::Initialize()
{
CreateBasicLevel(tRows, tLines, tSpaceBetweenBricks, tSpaceToEdge);
return;
}
@@ -66,4 +67,5 @@ void dd::Systems::LevelSystem::EndLevel()
Events::StageCleared e;
EventBroker->Publish(e);
return;
}
}
+63
View File
@@ -0,0 +1,63 @@
//
// Created by Adniklastrator on 2015-09-10.
//
#include "PrecompiledHeader.h"
#include "Game/PadSystem.h"
#include "Core/World.h"
void dd::Systems::PadSystem::Initialize()
{
Events::BindKey r;
r.KeyCode = GLFW_KEY_RIGHT;
r.Command = "right";
EventBroker->Publish(r);
Events::BindKey l;
l.KeyCode = GLFW_KEY_LEFT;
l.Command = "right";
EventBroker->Publish(l);
EVENT_SUBSCRIBE_MEMBER(m_EKeyDown, PadSystem::OnKeyDown);
return;
}
bool dd::Systems::PadSystem::OnKeyDown(const dd::Events::KeyDown &event)
{
return true;
}
/*bool dd::Systems::PadSteeringInputController::OnCommand(const Events::InputCommand &event)
{
std::string command = event.Command;
if (command == "right")
{
}
else if (command == "left")
{
}
return true;
}*/
bool dd::Systems::PadSystem::PadSteeringInputController::OnCommand(const Events::InputCommand &event)
{
std::string command = event.Command;
if (command == "right")
{
}
else if (command == "left")
{
}
return true;
}