예제 #1
0
    /// <summary>
    /// 退出Pve场景
    /// </summary>
    public void ExitPve()
    {
        if (!pveProxy.m_ExitSended)
        {
            var msg = new C2S_ExitPve();
            msg.protocolID = (ushort)KC2S_Protocol.c2s_exit_pve;

            NetworkManager.Instance.SendToGameServer(msg);

            pveProxy.m_ExitSended = true;
        }
    }
예제 #2
0
    /// <summary>
    /// 副本结束
    /// </summary>
    /// <param name="buf"></param>
    private void OnPveEnd(KProtoBuf buf)
    {
        PveProxy pveProxy = (PveProxy)GameFacade.Instance.RetrieveProxy(ProxyName.PveProxy);

        if (pveProxy.m_ExitSended)
        {
            return;
        }

        var msg = buf as S2C_PVE_END;

        C2S_ExitPve req = SingleInstanceCache.GetInstanceByType <C2S_ExitPve>();

        req.protocolID = (ushort)KC2S_Protocol.c2s_exit_pve;
        NetworkManager.Instance.SendToGameServer(req);

        pveProxy.m_ExitSended = true;
    }