]> git.localhorst.tv Git - gworm.git/blobdiff - src/world/Entity.cpp
basic entities
[gworm.git] / src / world / Entity.cpp
diff --git a/src/world/Entity.cpp b/src/world/Entity.cpp
new file mode 100644 (file)
index 0000000..d1cf34d
--- /dev/null
@@ -0,0 +1,21 @@
+#include "Entity.h"
+
+
+namespace gworm {
+
+Entity::Entity()
+: pos(0, 0)
+, vel(0, 0)
+, acc(0, 0)
+, mass(1) {
+
+}
+
+
+void Entity::Update(float dt) {
+       // euler
+       vel += dt * acc;
+       pos += dt * vel;
+}
+
+}