This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Godot; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Project.Extensions; | |
public static class GodotExtensions | |
{ | |
public static T? GetChildByType<T>(this Node node, bool recursive = true)where T : Node | |
{ | |
int childCount = node?.GetChildCount() ?? 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lobby.Join(); // you are going to have to pull the lobby from somewhere. Run the callback for getting the lobby list somewhere | |
// holy shit terrible implementation eventually fix this | |
//this is due to the fact that a second connection does not have access to the lobby owner id until it is joined. | |
//fucking why??? | |
Timer timer = new Timer(); | |
AddChild(timer); | |
timer.OneShot = true; | |
timer.WaitTime = 1.0d; |