Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Nov 18, 2023
1 parent dea6c92 commit d927a09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/entitymanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ std::shared_ptr<entity> 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;
}
Expand Down
5 changes: 3 additions & 2 deletions src/scriptengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ void scriptengine::run() {

lua.new_usertype<entity>(
"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,
Expand Down

0 comments on commit d927a09

Please sign in to comment.