summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Barney <samjbarney@gmail.com>2013-12-27 00:21:02 +0100
committerSamuel Barney <samjbarney@gmail.com>2013-12-27 00:21:02 +0100
commite5d24470564f4abd39813a5b6da38ec3d1de44fe (patch)
treebe11e83202c6daa53c8dc0243fa96d78653e50c7 /src
parentInitial Commit of the cComponent class. (diff)
downloadcuberite-e5d24470564f4abd39813a5b6da38ec3d1de44fe.tar
cuberite-e5d24470564f4abd39813a5b6da38ec3d1de44fe.tar.gz
cuberite-e5d24470564f4abd39813a5b6da38ec3d1de44fe.tar.bz2
cuberite-e5d24470564f4abd39813a5b6da38ec3d1de44fe.tar.lz
cuberite-e5d24470564f4abd39813a5b6da38ec3d1de44fe.tar.xz
cuberite-e5d24470564f4abd39813a5b6da38ec3d1de44fe.tar.zst
cuberite-e5d24470564f4abd39813a5b6da38ec3d1de44fe.zip
Diffstat (limited to 'src')
-rw-r--r--src/Entities/Compoments/Component.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Entities/Compoments/Component.h b/src/Entities/Compoments/Component.h
index 3d7ebccaa..24a13e62a 100644
--- a/src/Entities/Compoments/Component.h
+++ b/src/Entities/Compoments/Component.h
@@ -1,3 +1,5 @@
+#pragma once
+
#include "Entity.h"
class cComponent
@@ -6,4 +8,28 @@ protected:
cEntity * m_Self;
public:
cComponent(cEntity * a_Entity) : m_Self(a_Entity){}
+
+
+ // General
+ virtual void Tick(float a_Dt, cChunk & a_Chunk){}
+ virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL){}
+ virtual void SpawnOn(cClientHandle & a_Client){}
+
+ // World/Model Interaction
+ virtual void HandlePhysics(float a_Dt, cChunk & a_Chunk){}
+ virtual void OnCollisionWithEntity(cEntity * a_Entity){}
+
+ // Environmental Reactions
+ virtual void OnCollisionWithBlock(Vector3i & a_Position, BLOCKTYPE a_Block){}
+ virtual void OnStartedBurning(){}
+ virtual void OnFinishedBurning(){}
+
+ // Reactions
+ virtual void OnTakeDamage(TakeDamageInfo & a_TDI){}
+ virtual void OnRightClicked(){}
+ virtual void OnKilled(cEntity * a_Killer = NULL){}
+ //virtual void OnDestroy(){}
+
+ // Logic
+ virtual void OnAttackEntity(cEntity * a_Entity){}
}; \ No newline at end of file