예제 #1
0
    public void Surrender()
    {
//		NM = NetworkManager.singleton;
        NetPlayer[] NPs = GameObject.FindObjectsOfType <NetPlayer>();
        foreach (NetPlayer NP in NPs)
        {
            if (NP.isLocalPlayer)
            {
                netplayer = NP;
            }
        }

        if (isServer)
        {
            netplayer.CmdServerSurrender();
        }
        else if (isClient)
        {
            netplayer.CmdClientSurrender();
        }

//		if(isServer)
//			NetworkManager.StopHost();
//		else if(isClient)
//			NetworkManager.StopClient();
    }