43 template <
typename COMPONENT_TYPE>
111template <
typename COMPONENT_TYPE>
115 uint32_t componentFlags = 0;
The common base class of Nebula.
Definition refcounted.h:38
static void Register(ComponentId component, DrawFunc)
Definition componentinspection.cc:55
These are registered to the attribute registry so that we can add more functionality to attributes.
Definition component.h:75
void(*)(Game::World *, Game::Entity, void *) ComponentInitFunc
Definition component.h:90
ComponentInitFunc Init
Definition component.h:91
static void Register(ComponentId component)
Definition componentserialization.h:70
A FeatureUnit is an encapsulated feature which can be added to an application.
Definition featureunit.h:34
virtual void OnStart(World *world)
called from within GameServer::OnStart() after OnLoad
Definition featureunit.cc:105
virtual void OnStop(World *world)
called from withing GameServer::Stop()
Definition featureunit.cc:294
Util::CommandLineArgs args
cmdline args for configuration from cmdline
Definition featureunit.h:103
virtual void OnAttach()
called from GameServer::AttachGameFeature()
Definition featureunit.cc:36
virtual void OnLoad(World *world)
called from within GameServer::Load()
Definition featureunit.cc:87
virtual void OnFrame()
called in the middle of the feature trigger cycle
Definition featureunit.cc:175
virtual void OnBeforeLoad(World *world)
called from within GameServer::NotifyBeforeLoad()
Definition featureunit.cc:273
virtual void OnBeforeCleanup(World *world)
called from within GameServer::NotifyBeforeCleanup()
Definition featureunit.cc:282
Util::Array< Ptr< Manager > > managers
Definition featureunit.h:99
virtual void OnDecay()
called after entities has been destroyed and before releasing their memory
Definition featureunit.cc:208
bool IsActive() const
return true if featureunit is currently active
Definition featureunit.h:131
void SetCmdLineArgs(const Util::CommandLineArgs &a)
set command line args
Definition featureunit.h:140
bool active
Definition featureunit.h:100
virtual void OnActivate()
called after GameServer::AttachGameFeature()
Definition featureunit.cc:56
virtual __DeclareClass(FeatureUnit) public ~FeatureUnit()
destructor
Definition featureunit.cc:27
virtual void OnSave(World *world)
called from within GameServer::Save()
Definition featureunit.cc:121
virtual void OnRenderDebug()
called when game debug visualization is on
Definition featureunit.cc:225
virtual void OnEndFrame()
called at the end of the feature trigger cycle
Definition featureunit.cc:193
virtual void OnRemove()
called from GameServer::RemoveGameFeature()
Definition featureunit.cc:45
ComponentId RegisterComponentType(ComponentRegisterInfo< COMPONENT_TYPE > info={})
Register a component type.
Definition featureunit.h:113
virtual void RemoveManager(Ptr< Manager > manager)
remove a manager from the feature unit
Definition featureunit.cc:255
virtual void OnBeginFrame()
called on begin of frame
Definition featureunit.cc:138
virtual void OnDeactivate()
called before GameServer::RemoveGameFeature()
Definition featureunit.cc:68
virtual void AttachManager(Ptr< Manager > manager)
attach a manager to the feature unit
Definition featureunit.cc:243
const Util::CommandLineArgs & GetCmdLineArgs() const
get command line args
Definition featureunit.h:149
virtual void OnBeforeViews()
Called between beginning of frame and before the views are iterated.
Definition featureunit.cc:156
A container of entities, their components, and processors.
static AttributeId Register(Util::StringAtom name, TYPE defaultValue, uint32_t flags=0)
register a type (templated)
Definition attributeregistry.h:99
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Nebula's dynamic array class.
Definition array.h:60
A universal cmd line argument parser.
Definition commandlineargs.h:24
Game::EditorState.
Definition graphicsmanager.h:60
@ COMPONENTFLAG_DECAY
Component will decay.
Definition component.h:38
void ComponentDrawFuncT(ComponentId component, void *data, bool *commit)
Definition componentinspection.h:106
#define __DeclareClass(type)
Used for registering component types to the game world.
Definition component.h:61
OnInitFunc OnInit
initialization function to run for the component, or nullptr if not needed.
Definition component.h:67
bool decay
Set to true if the component should end up in the decay buffer before being completely destroyed.
Definition component.h:65
Definition attributeid.h:19