public void EnterGame(UnitZGameType type) { StartType = type; if (characterCreator) { characterCreator.SetCharacter(); } switch (StartType) { case UnitZGameType.HostOnline: Debug.Log("Host Game Online"); UnitZ.gameNetwork.HostGame(SceneStart, true); break; case UnitZGameType.HostLan: Debug.Log("Host Game"); UnitZ.gameNetwork.HostGame(SceneStart, false); break; case UnitZGameType.Connect: Debug.Log("Connect Game"); UnitZ.gameNetwork.JoinGame(); break; case UnitZGameType.Single: Debug.Log("Single Game"); UnitZ.gameNetwork.HostGame(SceneStart, false); UnitZ.gameNetwork.StartServerGame(); break; } }
public void EnterGame(UnitZGameType type) { StartType = type; if (characterCreator) { characterCreator.SetCharacter(); } switch (StartType) { case UnitZGameType.HostOnline: Debug.Log("Menu select > Host Game Online"); UnitZ.gameNetwork.HostGame(SceneStart, true); break; case UnitZGameType.HostLan: Debug.Log("Menu select > Host Game"); UnitZ.gameNetwork.HostGame(SceneStart, false); break; case UnitZGameType.Connect: Debug.Log("Menu select > Connect Game"); UnitZ.gameNetwork.JoinGame(); break; case UnitZGameType.Single: Debug.Log("Menu select > Single Game"); UnitZ.gameNetwork.AssignPlayersToSpawn(new PlayerLobby[1] { new PlayerLobby { CharacterIndex = UnitZ.characterManager.CharacterIndex, playerName = UnitZ.gameManager.UserName, playerTeam = 0, PlayerID = UnitZ.gameManager.UserID } }); UnitZ.gameNetwork.HostGame(SceneStart, false); UnitZ.gameNetwork.StartServerGame(); break; } }