15 #ifndef CORGI_COMPONENT_LIBRARY_COMMON_SERVICES_H_
16 #define CORGI_COMPONENT_LIBRARY_COMMON_SERVICES_H_
18 #include "breadboard/graph_factory.h"
21 #include "fplbase/asset_manager.h"
22 #include "fplbase/input.h"
23 #include "fplbase/renderer.h"
24 #include "fplbase/utilities.h"
27 namespace component_library {
87 fplbase::Renderer*
renderer() {
return renderer_; }
115 fplbase::AssetManager* asset_manager_;
117 breadboard::GraphFactory* graph_factory_;
118 fplbase::InputSystem* input_system_;
119 fplbase::Renderer* renderer_;
120 bool export_force_defaults_;
130 #endif // CORGI_COMPONENT_LIBRARY_COMMON_SERVICES_H_
bool export_force_defaults() const
This should be called when Components are exporting their data to a FlatBuffer. It indicates if the F...
Definition: common_services.h:105
A Component is an object that encapsulates all data and logic for Entities of a particular type...
Definition: component.h:43
void Initialize(fplbase::AssetManager *asset_manager, EntityFactory *entity_factory, breadboard::GraphFactory *graph_factory, fplbase::InputSystem *input_system, fplbase::Renderer *renderer)
Initializes the CommonServicesComponent with pointers to the various game services and managers...
Definition: common_services.h:62
Holds the data that Components need (e.g. the input system, renderer, etc.).
Definition: common_services.h:37
breadboard::GraphFactory * graph_factory()
Definition: common_services.h:78
CommonServicesComponent()
The default constructor to create an empty CommonServicesComponent.
Definition: common_services.h:49
fplbase::Renderer * renderer()
Definition: common_services.h:87
fplbase::AssetManager * asset_manager()
Definition: common_services.h:75
EntityFactory * entity_factory()
Definition: common_services.h:84
void AddFromRawData(corgi::EntityRef &, const void *)
This component should never be added to an Entity. It is only provided as an interface for other comp...
Definition: common_services.h:94
void set_export_force_defaults(bool b)
Set a flag to determine if Components, when exporting their data to FlatBuffers, should include defau...
Definition: common_services.h:112
A reference object for pointing into the vector pool. It acts as a pointer for vector pool elements a...
Definition: vector_pool.h:72
An EntityFactory builds Entities based on prototypes, using FlatBuffers to specify the raw data for E...
Definition: entity_factory.h:37
virtual ~CommonServicesComponent()
Destructor for CommonServicesComponent.
Definition: common_services.h:52
This is a unique Component, as no Entities will register with it and it contains no per-entity data...
Definition: common_services.h:46
#define CORGI_REGISTER_COMPONENT(ComponentType, DataType)
Definition: component_id_lookup.h:48
fplbase::InputSystem * input_system()
Definition: common_services.h:81