Update start_game_menu.cs
This commit is contained in:
parent
754ad355e6
commit
f86013b117
@ -112,9 +112,6 @@ public partial class start_game_menu : Control {
|
||||
State = _state.START;
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta){}
|
||||
|
||||
private void startGame(_gameType type) {
|
||||
switch (type) {
|
||||
case _gameType.SINGLE:
|
||||
@ -137,6 +134,8 @@ public partial class start_game_menu : Control {
|
||||
peer.CreateServer(666, 2);
|
||||
Multiplayer.MultiplayerPeer = peer;
|
||||
State = _state.HOST;
|
||||
|
||||
startGame(_gameType.LAN);
|
||||
}
|
||||
else {
|
||||
string ip = _ip.Get("text").ToString();
|
||||
@ -159,6 +158,8 @@ public partial class start_game_menu : Control {
|
||||
ENetMultiplayerPeer peer = new ENetMultiplayerPeer();
|
||||
peer.CreateClient(ip, 666);
|
||||
Multiplayer.MultiplayerPeer = peer;
|
||||
|
||||
startGame(_gameType.LAN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user