/// <summary> /// Inililizes the netcode /// </summary> /// <param name="gameObjects"></param> private void StartServerAndClient(List <GameObject> gameObjects) { if (GlobalData.GlobalData.GameData.TypeOfGame == GlobalData.GameData.GameType.Server) { mAgent = new NetworkAgent(AgentRole.Server, "VikingArcade"); mAgent.forwardport(); } else if (GlobalData.GlobalData.GameData.TypeOfGame == GlobalData.GameData.GameType.Client) { throw new Exception("Tried to creater server as client"); } }