示例#1
0
        private void NetworkConnectAsHost(string aIP)
        {
            NetHost host = new NetHost();

            host.StartListen();
            NetPoster.Instance.Connection = host;
        }
示例#2
0
        public bool CreateGameStaet()
        {
            NetHost host = new NetHost();

            host.StartListen();
            NetPoster.Instance.Connection = host;
            myIsNetworking = true;
            myIsHosty      = true;

            myGUICaretaker.GetGUI <Text>("Hosthost").SetVisibility(EGUIVisibility.Visible);

            myConnectedCallback = () =>
            {
                MatchInfo matchInfo = new MatchInfo();
                matchInfo.myMatchType = EMatchType.Host;
                myStateStack.AddCommand(new StateCommand {
                    myCommandType = EStateCommandType.Add, myStateType = EStateType.Major, myState = new GameState(matchInfo)
                });
            };
            return(true);
        }