diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-10-16 17:05:46 +0200 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-10-16 17:05:46 +0200 |
commit | d21afe5b33b4cb3f5cf1917f4d15f402de41a032 (patch) | |
tree | 6101e8c185bc2989b19b9db544353b32de35198d /mwe/ecs-homemade/src | |
parent | 018f6209378a0c30c1e44fba2f80888553b9f67c (diff) |
Make format
Diffstat (limited to 'mwe/ecs-homemade/src')
-rw-r--r-- | mwe/ecs-homemade/src/Components.cpp | 4 | ||||
-rw-r--r-- | mwe/ecs-homemade/src/main.cpp | 11 |
2 files changed, 6 insertions, 9 deletions
diff --git a/mwe/ecs-homemade/src/Components.cpp b/mwe/ecs-homemade/src/Components.cpp index e6a4673..de8753e 100644 --- a/mwe/ecs-homemade/src/Components.cpp +++ b/mwe/ecs-homemade/src/Components.cpp @@ -11,13 +11,13 @@ Rigidbody::Rigidbody(int mass, int gravityScale, int bodyType) Colider::Colider(int size) : mSize(size) {} void BehaviourScript::onStart() { - if(behaviour) { + if (behaviour) { behaviour->onStart(); } } void BehaviourScript::onUpdate() { - if(behaviour) { + if (behaviour) { behaviour->onUpdate(); } } diff --git a/mwe/ecs-homemade/src/main.cpp b/mwe/ecs-homemade/src/main.cpp index e4a8bda..70c5d2c 100644 --- a/mwe/ecs-homemade/src/main.cpp +++ b/mwe/ecs-homemade/src/main.cpp @@ -9,13 +9,9 @@ class myScript { public: - void onStart() { - std::cout << "In onStart" << std::endl; - } + void onStart() { std::cout << "In onStart" << std::endl; } - void onUpdate() { - std::cout << "In onUpdate" << std::endl; - } + void onUpdate() { std::cout << "In onUpdate" << std::endl; } }; int main() { @@ -57,7 +53,8 @@ int main() { } std::vector<std::reference_wrapper<BehaviourScript>> scripts - = ComponentManager::GetInstance().GetComponentsByType<BehaviourScript>(); + = ComponentManager::GetInstance() + .GetComponentsByType<BehaviourScript>(); for (BehaviourScript & script : scripts) { //script.onStart(); //script.onUpdate(); |