summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Components
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Components')
-rw-r--r--src/Mobs/Components/AttackComponent.cpp5
-rw-r--r--src/Mobs/Components/CMakeLists.txt18
-rw-r--r--src/Mobs/Components/EnvironmentComponent.cpp5
-rw-r--r--src/Mobs/Components/MovementComponent.cpp5
4 files changed, 28 insertions, 5 deletions
diff --git a/src/Mobs/Components/AttackComponent.cpp b/src/Mobs/Components/AttackComponent.cpp
index e69de29bb..ae721f00b 100644
--- a/src/Mobs/Components/AttackComponent.cpp
+++ b/src/Mobs/Components/AttackComponent.cpp
@@ -0,0 +1,5 @@
+#include "Globals.h"
+#include "AttackComponent.h"
+#include "../Monster.h"
+
+cAttackComponent::cAttackComponent(cMonster * a_Entity) : m_Self(a_Entity){}
diff --git a/src/Mobs/Components/CMakeLists.txt b/src/Mobs/Components/CMakeLists.txt
index 187384d7f..0c6a96c07 100644
--- a/src/Mobs/Components/CMakeLists.txt
+++ b/src/Mobs/Components/CMakeLists.txt
@@ -3,10 +3,18 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
-file(GLOB SOURCE
- "*.cpp"
- "*.h"
-)
+SET (SRCS
+ AIComponent.cpp
+ AttackComponent.cpp
+ EnvironmentComponent.cpp
+ MovementComponent.cpp)
+
+SET (HDRS
+ AIComponent.h
+ AttackComponent.h
+ EnvironmentComponent.h
+ MovementComponent.h)
+
if(NOT MSVC)
- add_library(Components ${SOURCE})
+ add_library(Components ${SRCS} ${HDRS})
endif() \ No newline at end of file
diff --git a/src/Mobs/Components/EnvironmentComponent.cpp b/src/Mobs/Components/EnvironmentComponent.cpp
index e69de29bb..f8cfc37ee 100644
--- a/src/Mobs/Components/EnvironmentComponent.cpp
+++ b/src/Mobs/Components/EnvironmentComponent.cpp
@@ -0,0 +1,5 @@
+#include "Globals.h"
+#include "EnvironmentComponent.h"
+#include "../Monster.h"
+
+cEnvironmentComponent::cEnvironmentComponent(cMonster * a_Entity) : m_Self(a_Entity){}
diff --git a/src/Mobs/Components/MovementComponent.cpp b/src/Mobs/Components/MovementComponent.cpp
index e69de29bb..6e92928d4 100644
--- a/src/Mobs/Components/MovementComponent.cpp
+++ b/src/Mobs/Components/MovementComponent.cpp
@@ -0,0 +1,5 @@
+#include "Globals.h"
+#include "MovementComponent.h"
+#include "../Monster.h"
+
+cMovementComponent::cMovementComponent(cMonster * a_Entity) : m_Self(a_Entity){}