aboutsummaryrefslogtreecommitdiffstats
path: root/include/components/wander.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/components/wander.hpp')
-rw-r--r--include/components/wander.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/components/wander.hpp b/include/components/wander.hpp
index 2001e89..d275158 100644
--- a/include/components/wander.hpp
+++ b/include/components/wander.hpp
@@ -1,16 +1,18 @@
#ifndef COMPONENTS_WANDER_HPP_
#define COMPONENTS_WANDER_HPP_
+#include <string>
+
+#include <systems/lua.hpp>
+
/**
* Causes the entity to wander about.
*/
struct Wander {
- Wander(float ix = 0, float r = 0)
- : initialX(ix), range(r), countdown(0) {}
+ Wander(const std::string& s = "")
+ : script(LuaSystem::makeScript(s)) {}
- float initialX;
- float range;
- int countdown;
+ LuaScript script;
};
#endif // COMPONENTS_WANDER_HPP_