Add species name to ecs behavior context
This commit is contained in:
parent
b724b8d68a
commit
c55bea1228
1 changed files with 2 additions and 1 deletions
|
|
@ -69,7 +69,6 @@ namespace psemek::util
|
|||
virtual std::size_t list_size() const = 0;
|
||||
|
||||
private:
|
||||
|
||||
std::string name_;
|
||||
handle id_;
|
||||
|
||||
|
|
@ -90,6 +89,7 @@ namespace psemek::util
|
|||
|
||||
typename Behavior::context ctx;
|
||||
ctx.species = id_;
|
||||
ctx.species_name = name_;
|
||||
|
||||
((std::get<Components *>(ctx.components) = get_species_component<Components>()), ...);
|
||||
|
||||
|
|
@ -239,6 +239,7 @@ namespace psemek::util
|
|||
struct context
|
||||
{
|
||||
ecs_detail::handle species;
|
||||
std::string_view species_name;
|
||||
ecs_detail::handle entity;
|
||||
|
||||
component_ptrs components;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue