Move empty definitions to header

This commit is contained in:
David Markowitz 2023-06-26 23:01:46 -07:00
parent 7c1265911c
commit 478b6ff6a9
2 changed files with 9 additions and 45 deletions

View File

@ -5,39 +5,3 @@ Component::Component(Entity* owningEntity) {
DluAssert(owningEntity != nullptr);
m_ParentEntity = owningEntity;
}
Component::~Component() {
}
void Component::Update(float deltaTime) {
}
void Component::OnUse(Entity* originator) {
}
void Component::UpdateXml(tinyxml2::XMLDocument* doc) {
}
void Component::LoadFromXml(tinyxml2::XMLDocument* doc) {
}
void Component::Startup() {
}
void Component::LoadConfigData() {
}
void Component::LoadTemplateData() {
}
void Component::Serialize(RakNet::BitStream* bitStream, bool isConstruction) {
}

View File

@ -14,7 +14,7 @@ namespace RakNet {
class Component {
public:
Component(Entity* owningEntity);
virtual ~Component();
virtual ~Component() {};
/**
* Gets the owner of this component
@ -26,45 +26,45 @@ public:
* Event called when this component is being used, e.g. when some entity interacted with it
* @param originator
*/
virtual void OnUse(Entity* originator);
virtual void OnUse(Entity* originator) {};
/**
* Save data from this componennt to character XML
* @param doc the document to write data to
*/
virtual void UpdateXml(tinyxml2::XMLDocument* doc);
virtual void UpdateXml(tinyxml2::XMLDocument* doc) {};
/**
* Load base data for this component from character XML
* @param doc the document to read data from
*/
virtual void LoadFromXml(tinyxml2::XMLDocument* doc);
virtual void LoadFromXml(tinyxml2::XMLDocument* doc) {};
/**
* Call after you have newed the component to initialize it
*/
virtual void Startup();
virtual void Startup() {};
/**
* Updates the component in the game loop
* @param deltaTime time passed since last update
*/
virtual void Update(float deltaTime);
virtual void Update(float deltaTime) {};
/**
* Loads the data of this component from the luz/lvl configuration
*/
virtual void LoadConfigData();
virtual void LoadConfigData() {};
/**
* Loads the data of this component from the cdclient database
*/
virtual void LoadTemplateData();
virtual void LoadTemplateData() {};
/**
* Serializes the component for delivery to the client(s)
*/
virtual void Serialize(RakNet::BitStream* bitStream, bool isConstruction = false);
virtual void Serialize(RakNet::BitStream* bitStream, bool isConstruction = false) {};
protected:
/**