//#include "script_scene.hpp"

#include "pw/scene/node.hpp"
#include "runtime_lua.hpp"

namespace pw {

void register_scene_function(sol::state&,sol::table &ns)
{

	ns.new_usertype<node>("node",
						  sol::constructors<node()>(),
						  "add_child",&node::add_child,
						  "children",sol::readonly_property(&node::children),
						  "parent",sol::readonly_property(&node::parent),
						  "child_count",sol::readonly_property(&node::child_count),
						  "create", []() -> std::shared_ptr<node> { return std::make_shared<node>(); },
						  "is_leaf", sol::readonly_property(&node::is_leaf),
						  "is_root", sol::readonly_property(&node::is_root),
						  //								  "share",scripting::property(scripting::resolve<std::shared_ptr<node>(std::make_shared<node>))
						  "name",sol::property(&node::name,&node::set_name)
						  );
}

PW_REGISTER_LUA(scene)

}
