#include "Entity.h" #include "Globals.h" Entity::Entity(const EntityType* zType, Framework::Model3DData* model, Framework::Model3DTextur* texture, int id) : Model3D(), id(id), zType(zType) { setModelDaten(model); setModelTextur(texture); } Entity::~Entity() {} void Entity::api(char* message) { switch (message[0]) { case 0: { // update position pos.x = *(float*)(message + 1); pos.y = *(float*)(message + 5); pos.z = *(float*)(message + 9); break; } case 1: { // update rotation // TODO break; } } } bool Entity::tick(double time) { return Model3D::tick(time); } int Entity::getId() const { return id; } const EntityType* Entity::zEntityType() const { return zType; } void Entity::lock() { cs.lock(); } void Entity::unlock() { cs.unlock(); }