diff options
author | Alec Thomas <alec@swapoff.org> | 2015-06-23 17:28:49 +0200 |
---|---|---|
committer | Alec Thomas <alec@swapoff.org> | 2015-06-23 17:28:49 +0200 |
commit | c0b74eec4babc5f3e991e2027afd004324da4a26 (patch) | |
tree | d7cd65347ecf0b07f0e6c4513cd558e777fa0828 | |
parent | d4a42e1793e09423c886a4411f61db88fe1151ff (diff) |
Update example.
-rw-r--r-- | examples/example.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/examples/example.cc b/examples/example.cc index d611756..7488a74 100644 --- a/examples/example.cc +++ b/examples/example.cc @@ -33,13 +33,6 @@ using std::endl; namespace ex = entityx; -namespace std { -template <> -struct hash<ex::Entity> { - std::size_t operator()(const ex::Entity& k) const { return k.id().id(); } -}; -} - float r(int a, float b = 0) { return static_cast<float>(std::rand() % (a * 1000) + b * 1000) / 1000.0; @@ -94,7 +87,7 @@ public: void update(ex::EntityManager &es, ex::EventManager &events, ex::TimeDelta dt) override { int c = 0; ex::ComponentHandle<Collideable> collideable; - for (ex::Entity entity : es.entities_with_components(collideable)) c++; + for (ex::Entity entity : es.entities_with_components<Collideable>()) c++; for (int i = 0; i < count - c; i++) { ex::Entity entity = es.create(); |