示例#1
0
        private void    OnClientDisconnected()
        {
            string s = "";

            if (CmdLineArgumentsProcessor.GetArgument("autoexit", ref s))
            {
                GameManager.singleton.ExitApplication();
            }
        }
示例#2
0
        private void    OnServerStopped()
        {
            string s = "";

            if (CmdLineArgumentsProcessor.GetArgument("autoexit", ref s))
            {
                GameManager.singleton.ExitApplication();
            }
        }
示例#3
0
        void Start()
        {
            string s = "";

            if (CmdLineArgumentsProcessor.GetArgument("autochooseteam", ref s))
            {
                // automatically choose team
                PlayerTeamChooser.onReceivedChooseTeamMessage += (string[] teams) => {
                    // choose random team
                    var team = teams[UnityEngine.Random.Range(0, teams.Length)];
                    Player.local.GetComponent <PlayerTeamChooser> ().TeamChoosed(team);
                };
            }
        }