Added CBall
This commit is contained in:
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Binary file not shown.
@@ -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
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
//#include "Core/EContact.h"
|
//#include "Core/EContact.h"
|
||||||
#include "Core/EventBroker.h"
|
#include "Core/EventBroker.h"
|
||||||
#include "Core/World.h"
|
#include "Core/World.h"
|
||||||
|
#include "Game/CBall.h"
|
||||||
#include "Game/EStageCleared.h"
|
#include "Game/EStageCleared.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ set(SOURCE_FILES
|
|||||||
${SOURCE_FILES_Rendering}
|
${SOURCE_FILES_Rendering}
|
||||||
${SOURCE_FILES_Transform}
|
${SOURCE_FILES_Transform}
|
||||||
${SOURCE_FILES_Game}
|
${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)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ void dd::Systems::LevelSystem::Initialize()
|
|||||||
{
|
{
|
||||||
CreateBasicLevel(tRows, tLines, tSpaceBetweenBricks, tSpaceToEdge);
|
CreateBasicLevel(tRows, tLines, tSpaceBetweenBricks, tSpaceToEdge);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,13 +79,12 @@ bool dd::Systems::LevelSystem::OnContact(/*const dd::Events::Contact &event,*/)
|
|||||||
EntityID entityBall;
|
EntityID entityBall;
|
||||||
EntityID entity1;
|
EntityID entity1;
|
||||||
EntityID entity2;
|
EntityID entity2;
|
||||||
EntityID ball;
|
|
||||||
|
|
||||||
auto brick = m_World->GetComponent<Components::Brick>(entity1);
|
auto brick = m_World->GetComponent<Components::Brick>(entity1);
|
||||||
|
auto ball = m_World->GetComponent<Components::Ball>(entity2);
|
||||||
if (brick != NULL)
|
if (brick != NULL)
|
||||||
{
|
{
|
||||||
entityBrick = entity1;
|
entityBrick = entity1;
|
||||||
ball = m_World->GetComponent<Components::Ball>(entity2);
|
|
||||||
if (ball != NULL)
|
if (ball != NULL)
|
||||||
{
|
{
|
||||||
entityBall = entity2;
|
entityBall = entity2;
|
||||||
|
|||||||
Reference in New Issue
Block a user