mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 13:59:19 +02:00
Make Component System separate from Global
This commit is contained in:
@@ -59,3 +59,9 @@ std::vector<entt::entity> ECS::FindByName(std::string_view name)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ECS &GetComponentSystem()
|
||||||
|
{
|
||||||
|
static ECS _ecs;
|
||||||
|
return _ecs;
|
||||||
|
}
|
||||||
@@ -145,4 +145,7 @@ class ECS final
|
|||||||
world_.remove<T...>(entity);
|
world_.remove<T...>(entity);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern ECS& GetComponentSystem();
|
||||||
|
#define CS GetComponentSystem();
|
||||||
#endif // EU07_ECS_H
|
#endif // EU07_ECS_H
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ struct global_settings {
|
|||||||
|
|
||||||
std::chrono::steady_clock::time_point startTimestamp;
|
std::chrono::steady_clock::time_point startTimestamp;
|
||||||
|
|
||||||
/// EnTT variables
|
|
||||||
entt::registry world;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Mapa z watkami w formacie <std::string nazwa, std::thread watek>
|
/// Mapa z watkami w formacie <std::string nazwa, std::thread watek>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user