summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Components/EnvironmentComponent.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Components/EnvironmentComponent.h')
-rw-r--r--src/Mobs/Components/EnvironmentComponent.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Mobs/Components/EnvironmentComponent.h b/src/Mobs/Components/EnvironmentComponent.h
new file mode 100644
index 000000000..078e81501
--- /dev/null
+++ b/src/Mobs/Components/EnvironmentComponent.h
@@ -0,0 +1,33 @@
+#pragma once
+
+class cMonster;
+class cEntity;
+class cChunk;
+
+class cEnvironmentComponent
+{
+protected:
+ cMonster * m_Self;
+ int m_SightDistance;
+ bool m_OnGround;
+
+ bool m_BurnsInDaylight;
+public:
+ cEnvironmentComponent(cMonster * a_Entity, int a_SightDistance);
+ virtual ~cEnvironmentComponent(){}
+
+ virtual void Tick(float a_Dt, cChunk & a_Chunk);
+
+ // Get Functions
+ int GetSightDistance() { return m_SightDistance ; }
+ bool GetOnGround() { return m_OnGround; }
+ bool GetBurnsInDaylight() { return m_BurnsInDaylight; }
+
+ // Set Functions
+ void SetSightDistance(int a_SightDistance) { m_SightDistance = a_SightDistance; }
+ void SetOnGround(bool a_Bool) { m_OnGround = a_Bool; }
+ void SetBurnsInDaylight(bool a_Bool) { m_BurnsInDaylight = a_Bool; }
+
+ // Handle functions
+ void HandleDaylightBurning(cChunk & a_Chunk);
+};