From 48cd8419bb274345fe386d47843f9aa16910e090 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Wed, 27 Sep 2017 11:35:22 -0400 Subject: lua-scripted wandering --- include/components/wander.hpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'include/components/wander.hpp') 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 + +#include + /** * 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_ -- cgit v1.2.3