mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
feat: passing args to component in entity definition
This commit is contained in:
parent
f2aa77db8b
commit
f6be6689aa
5 changed files with 33 additions and 7 deletions
|
|
@ -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)) {
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue