Ejemplo n.º 1
0
    //Callback (Executed locally on the server)
    public void OnGameObjectInteraction(NetworkMessage netMsg)
    {
        InteractionMessage msg = netMsg.ReadMessage <InteractionMessage> ();

        Debug.Log("Message received " + msg.ToString());
        NetworkInstanceId netId = new NetworkInstanceId(msg.netId);
        GameObject        go    = NetworkServer.FindLocalObject(netId);

        PlayerCommands.OnGameObjectInteraction(go, msg.method, msg.args);
    }