모델 업로드 구조 완성
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#include "vulkan_engine/vulkan/vertex.h"
|
||||
#include "utils/snowflake.h"
|
||||
|
||||
extern std::uint8_t CLIENTID;
|
||||
|
||||
namespace veng {
|
||||
struct Model {
|
||||
Model() : graphics_(nullptr) {}
|
||||
@@ -35,8 +37,9 @@ struct Model {
|
||||
lifespan(other.lifespan),
|
||||
OnColision(other.OnColision),
|
||||
visible(other.visible),
|
||||
colision(other.colision) {
|
||||
ID = utils::GenerateID();
|
||||
colision(other.colision),
|
||||
networkReplicated(other.networkReplicated) {
|
||||
ID = utils::GenerateID(CLIENTID);
|
||||
graphics_ = nullptr;
|
||||
}
|
||||
|
||||
@@ -60,7 +63,9 @@ struct Model {
|
||||
lifespan(other.lifespan),
|
||||
OnColision(other.OnColision),
|
||||
visible(other.visible),
|
||||
colision(other.colision) {
|
||||
colision(other.colision),
|
||||
networkReplicated(other.networkReplicated)
|
||||
{
|
||||
ID = other.ID;
|
||||
::memset(&other.ID, 0, 8);
|
||||
|
||||
@@ -92,6 +97,7 @@ struct Model {
|
||||
OnColision = other.OnColision;
|
||||
visible = other.visible;
|
||||
colision = other.colision;
|
||||
networkReplicated = other.networkReplicated;
|
||||
|
||||
graphics_ = other.graphics_;
|
||||
other.graphics_ = nullptr;
|
||||
@@ -137,6 +143,7 @@ struct Model {
|
||||
|
||||
bool visible = true;
|
||||
bool colision = false;
|
||||
bool networkReplicated = true;
|
||||
|
||||
private:
|
||||
class Graphics* graphics_;
|
||||
|
||||
@@ -28,7 +28,7 @@ class Engine {
|
||||
void NetUpdate(std::shared_ptr<Network::Socket> sock);
|
||||
|
||||
void NetworkUpload(std::shared_ptr<Network::Socket> sock);
|
||||
void RefreshFromServer(std::shared_ptr<Network::Socket> sock);
|
||||
void ResponseToServerAndRefresh(std::shared_ptr<Network::Socket> sock);
|
||||
|
||||
std::function<void(Engine&)> BeginPlay = [](Engine& engine) {};
|
||||
std::function<void(Engine&, std::float_t delta_time)> Tick =
|
||||
|
||||
Reference in New Issue
Block a user