diff options
Diffstat (limited to 'game.cpp')
-rw-r--r-- | game.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -10,12 +10,19 @@ Game* Game::game = NULL; Game::Game() : socket(io_service) { scene = new Scene(); + + scene->lua->set_say_func(boost::bind(&Game::say, this, _1)); } Game::~Game() { delete scene; } +void Game::say(const std::string msg) { + message::Message m(msg); + m.send(socket); +} + void Game::run(const std::string host, const unsigned int port) { run(host, boost::lexical_cast<std::string>(port)); } |