feat: passing args to component in entity definition

This commit is contained in:
MihailRis
2025-08-06 23:34:00 +03:00
parent f2aa77db8b
commit f6be6689aa
5 changed files with 33 additions and 7 deletions
+9 -2
View File
@@ -80,11 +80,18 @@ struct UserComponent {
std::string name;
EntityFuncsSet funcsset;
scriptenv env;
dv::value params;
UserComponent(
const std::string& name, EntityFuncsSet funcsset, scriptenv env
const std::string& name,
EntityFuncsSet funcsset,
scriptenv env,
dv::value params
)
: name(name), funcsset(funcsset), env(env) {
: name(name),
funcsset(funcsset),
env(std::move(env)),
params(std::move(params)) {
}
};