Ejemplo n.º 1
0
    /// <summary>
    /// Constructs a NetworkFrame and sends it from a NetworkRPC
    /// </summary>
    /// <param name="rpc">The RPC being sent over the network</param>
    private void SendRPC(NetworkRPC rpc, NetworkPlayer player)
    {
        NetworkRPCFrame frame = new NetworkRPCFrame(rpc.ToString(), "server", player.m_Id);

        frame.m_Important = rpc.m_Important;

        QueueFrame(frame);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Sends a RPC to the game server
    /// </summary>
    /// <param name="rpc">The RPC being sent</param>
    public void SendRPC(NetworkRPC rpc)
    {
        NetworkRPCFrame networkRPCFrame = new NetworkRPCFrame(rpc.ToString(), GetUniqueIndentifier(), "server")
        {
            m_Important = rpc.m_Important
        };

        QueueFrame(networkRPCFrame);
    }