diff --git a/src/entitymanager.cpp b/src/entitymanager.cpp index 33364cd..49e8d66 100644 --- a/src/entitymanager.cpp +++ b/src/entitymanager.cpp @@ -28,7 +28,7 @@ std::shared_ptr entitymanager::spawn() { } const auto e = entity::create({buffer.begin(), buffer.end()}); - std::cout << "Spawned entity: " << e->id() << std::endl; + std::cout << "[entitymanager] spawn: " << e->id() << std::endl; _entities.emplace_back(e); return e; } diff --git a/src/scriptengine.cpp b/src/scriptengine.cpp index 5686db3..07b20f6 100644 --- a/src/scriptengine.cpp +++ b/src/scriptengine.cpp @@ -61,8 +61,9 @@ void scriptengine::run() { lua.new_usertype( "Entity", - "x", sol::property(&entity::get_x, &entity::set_x), - "y", sol::property(&entity::get_y, &entity::set_y), + "id", sol::property(&entity::id), + "x", sol::property(&entity::x, &entity::set_x), + "y", sol::property(&entity::y, &entity::set_y), "width", sol::property(&entity::width), "height", sol::property(&entity::height), "move", &entity::move,