mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-26 07:27:18 +00:00
PropertyComponent pass
This commit is contained in:
parent
4d88f63338
commit
37bcc81694
@ -2,10 +2,4 @@
|
|||||||
#include "GameMessages.h"
|
#include "GameMessages.h"
|
||||||
#include "dZoneManager.h"
|
#include "dZoneManager.h"
|
||||||
|
|
||||||
PropertyComponent::PropertyComponent(Entity* parent) : Component(parent) {
|
PropertyComponent::PropertyComponent(Entity* parent) : Component(parent) { }
|
||||||
m_PropertyName = parent->GetVar<std::string>(u"propertyName");
|
|
||||||
m_PropertyState = new PropertyState();
|
|
||||||
}
|
|
||||||
|
|
||||||
PropertyComponent::~PropertyComponent() = default;
|
|
||||||
|
|
||||||
|
@ -3,32 +3,16 @@
|
|||||||
* Copyright 2018
|
* Copyright 2018
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PROPERTYCOMPONENT_H
|
#ifndef __PROPERTYCOMPONENT_H__
|
||||||
#define PROPERTYCOMPONENT_H
|
#define __PROPERTYCOMPONENT_H__
|
||||||
|
|
||||||
#include "BitStream.h"
|
|
||||||
#include "Entity.h"
|
|
||||||
#include "Component.h"
|
#include "Component.h"
|
||||||
#include "eReplicaComponentType.h"
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
struct PropertyState {
|
|
||||||
LWOOBJID ownerID;
|
|
||||||
LWOOBJID propertyID;
|
|
||||||
bool rented;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This component is unused and has no functionality
|
|
||||||
*/
|
|
||||||
class PropertyComponent : public Component {
|
class PropertyComponent : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY;
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY;
|
||||||
explicit PropertyComponent(Entity* parentEntity);
|
PropertyComponent(Entity* parentEntity);
|
||||||
~PropertyComponent() override;
|
|
||||||
[[nodiscard]] PropertyState* GetPropertyState() const { return m_PropertyState; };
|
|
||||||
private:
|
|
||||||
PropertyState* m_PropertyState;
|
|
||||||
std::string m_PropertyName;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PROPERTYCOMPONENT_H
|
#endif // __PROPERTYCOMPONENT_H__
|
||||||
|
Loading…
Reference in New Issue
Block a user