Added CBall

This commit is contained in:
PlatinumSkink
2015-09-10 21:46:03 +02:00
parent a047e46fe9
commit 1d94338214
6 changed files with 28 additions and 5 deletions

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.
+25
View File
@@ -0,0 +1,25 @@
//
// Created by Administrator on 2015-09-10.
//
#ifndef DAYDREAM_CPAD_H
#define DAYDREAM_CPAD_H
#include "Core/Component.h"
namespace dd
{
namespace Components
{
struct Ball : Component
{
};
}
}
#endif //DAYDREAM_CPAD_H
+1
View File
@@ -12,6 +12,7 @@
//#include "Core/EContact.h"
#include "Core/EventBroker.h"
#include "Core/World.h"
#include "Game/CBall.h"
#include "Game/EStageCleared.h"
#include <fstream>
#include <iostream>
+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/CPad.h Game/PadSystem.cpp ../../include/Game/PadSystem.h)
)
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
+1 -4
View File
@@ -11,8 +11,6 @@ void dd::Systems::LevelSystem::Initialize()
{
CreateBasicLevel(tRows, tLines, tSpaceBetweenBricks, tSpaceToEdge);
return;
}
@@ -81,13 +79,12 @@ bool dd::Systems::LevelSystem::OnContact(/*const dd::Events::Contact &event,*/)
EntityID entityBall;
EntityID entity1;
EntityID entity2;
EntityID ball;
auto brick = m_World->GetComponent<Components::Brick>(entity1);
auto ball = m_World->GetComponent<Components::Ball>(entity2);
if (brick != NULL)
{
entityBrick = entity1;
ball = m_World->GetComponent<Components::Ball>(entity2);
if (ball != NULL)
{
entityBall = entity2;