Entities improvement
This commit is contained in:
parent
19f223b474
commit
76ac624519
11 changed files with 39 additions and 27 deletions
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
class vessel_entity : public IEntity {
|
||||
private:
|
||||
static unsigned long long __global_id;
|
||||
static entity_id __global_id;
|
||||
|
||||
unsigned long long _id;
|
||||
entity_id _id;
|
||||
dpoint_entity _harbor;
|
||||
unsigned int _capacity;
|
||||
QVector<cargo_entity> _cargo;
|
||||
|
|
@ -19,13 +19,14 @@ public:
|
|||
vessel_entity() = default;
|
||||
vessel_entity(const dpoint_entity &harbor, unsigned int capacity);
|
||||
|
||||
unsigned long long id();
|
||||
entity_id id();
|
||||
const dpoint_entity harbor();
|
||||
unsigned int capacity();
|
||||
const QVector<cargo_entity> cargo();
|
||||
|
||||
void serialize(QDataStream &output);
|
||||
void deserialize(QDataStream &input);
|
||||
static void preloadGlobalId(entity_id gid);
|
||||
};
|
||||
|
||||
#endif // VESSEL_ENTITY_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue