27 lines
566 B
C++
27 lines
566 B
C++
#pragma once
|
|
|
|
#include "scene/main/node.h"
|
|
#include "you_done_it/ydi_networking.h"
|
|
|
|
class ClientNode : Node {
|
|
GDCLASS(ClientNode, Node);
|
|
static ClientNode *singleton_instance;
|
|
static void _bind_methods();
|
|
void enter_tree();
|
|
void process();
|
|
void exit_tree();
|
|
void reveal_backlog();
|
|
|
|
protected:
|
|
void _notification(int what);
|
|
|
|
public:
|
|
static ClientNode *get_singleton();
|
|
void connect_to_server(String const &url);
|
|
|
|
private:
|
|
NetworkData::ConnectionStatus state{ NetworkData::CONNECTION_DISCONNECTED };
|
|
|
|
public:
|
|
static String const sig_connection_changed;
|
|
};
|