2#include "ExtensionRegistry.h"
3#include "Resources/ResourceStore.h"
4#include "ResourceManifest.h"
5#include "Serialization/EntityReader.h"
7#include "BadgeSetSystem.h"
8#include "BadgeSetComponent.h"
10#include "Foundation/Logging/Logger.h"
15 constexpr const char* cBadgeSetEntityDefinition = R
"(
22 "InstancedMeshRenderComponent"
32 static constexpr const char* cExtensionKey =
"BadgeSet";
45 const std::string resourceArchive =
"Cogs.Core.Extensions.BadgeSet.zip";
50 bool resourceArchiveAdded =
false;
51 auto manifest = getResourceManifest(context);
52 for (
auto& item : manifest) {
53 if (item.find(resourceArchive) != std::string::npos) {
55 resourceArchiveAdded =
true;
59 if (!resourceArchiveAdded) {
68 readEntityDefinition(cBadgeSetEntityDefinition, context->
store);
74 }BadgeSetExtensionInstance;
A Context instance contains all the services, systems and runtime components needed to use Cogs.
class EntityStore * store
Entity store.
std::unique_ptr< class ResourceStore > resourceStore
ResourceStore service instance.
static void add(Extension *extension, StringView version)
Adds the given extension to the registry, ensuring the initialization methods are called at appropria...
Log implementation class.
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
constexpr Log getLogger(const char(&name)[LEN]) noexcept
static void registerType()
Register the type in the type system.
virtual bool initialize(Context *context) override
Initialize extension for the given context.
virtual const char * getExtensionKey() const override
Get the extensions unique key, used to check for extension presence and retrieve extension specific d...
virtual bool initializeStatic() override
Initialize extension statically.
Defines an extension to Cogs.Core and provides methods to override in order to initialize extension c...
@ Geometry
Run at the time geometry data is updated.