parent
58c668d7a2
commit
f6c5ce685a
3 changed files with 20 additions and 10 deletions
@ -1,9 +1,20 @@ |
||||
using System.Globalization; |
||||
|
||||
public partial class Game : Node |
||||
{ |
||||
static Game _game; |
||||
public static Game Instance => _game |
||||
??= ((SceneTree)Engine.GetMainLoop()).Root.GetNode<Game>("Game"); |
||||
|
||||
[Export] public Player LocalPlayer { get; set; } |
||||
|
||||
public MultiplayerManager MultiplayerManager { get; private set; } |
||||
|
||||
public override void _EnterTree() |
||||
=> MultiplayerManager = GetNode<MultiplayerManager>("MultiplayerManager"); |
||||
{ |
||||
// Set invariant culture so formatting is consistent. |
||||
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; |
||||
|
||||
MultiplayerManager = GetNode<MultiplayerManager>("MultiplayerManager"); |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue