feat: work on client logic & integration

This commit is contained in:
Sara Gerretsen 2025-10-11 23:11:09 +02:00
parent 21ed479960
commit df5e2c86dc
5 changed files with 173 additions and 0 deletions

View file

@ -0,0 +1,29 @@
#include "server_node.h"
#include "ydi_server.h"
#include <core/config/engine.h>
void ServerNode::_bind_methods() {}
void ServerNode::enter_tree() {
ydi::server::open();
}
void ServerNode::exit_tree() {
ydi::server::close();
}
void ServerNode::_notification(int what) {
if (Engine::get_singleton()->is_editor_hint()) {
return;
}
switch (what) {
case NOTIFICATION_ENTER_TREE:
enter_tree();
return;
case NOTIFICATION_EXIT_TREE:
exit_tree();
return;
default:
return;
}
}