aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/PhysicsSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/PhysicsSystem.cpp')
-rw-r--r--src/crepe/PhysicsSystem.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/crepe/PhysicsSystem.cpp b/src/crepe/PhysicsSystem.cpp
new file mode 100644
index 0000000..c24afa2
--- /dev/null
+++ b/src/crepe/PhysicsSystem.cpp
@@ -0,0 +1,20 @@
+#include "PhysicsSystem.h"
+#include "ComponentManager.h"
+#include "Rigidbody.h"
+#include "Transform.h"
+#include <iostream>
+
+using namespace crepe;
+
+PhysicsSystem::PhysicsSystem() {
+
+}
+
+void PhysicsSystem::update() {
+ ComponentManager& mgr = ComponentManager::get_instance();
+ std::vector<std::reference_wrapper<Rigidbody>> rigidbodies = mgr.get_components_by_type<Rigidbody>();
+ std::vector<std::reference_wrapper<Transform>> transforms = mgr.get_components_by_type<Transform>();
+ for (Rigidbody& rigidbody : rigidbodies) {
+ std::cout << rigidbody.gameObjectId << std::endl;
+ }
+}