Exemple #1
0
    void OnTriggerExit(Collider colSend)
    {
        //atStationStatus--;
        //station = false;
        atStation = false;

        pnMessage newMessage = new pnMessage();

        //newMessage.atStation = atStationStatus;
        newMessage.atStationStatus = atStation;
        newMessage.status          = 0;

        /*
         * dataServer.Publish()
         * .Channel(channelName)
         * .Message(newMessage)
         * .Async((result, status) =>
         * {
         *  if (!status.Error)
         *  {
         *      Debug.Log(string.Format("Publish Timetoken: {0}", result.Timetoken));
         *      Debug.Log(atStation);
         *
         *  }
         *  else
         *  {
         *      Debug.Log(status.Error);
         *      Debug.Log(status.ErrorData.Info);
         *  }
         * });
         */
    }
Exemple #2
0
    void OnTriggerExit(Collider colSend)
    {
        //atStationStatus--;
        //station = false;
        atStation = false;

        pnMessage newMessage = new pnMessage();

        //newMessage.atStation = atStationStatus;
        newMessage.atStationStatus = atStation;
        newMessage.status          = 0;

        dataServer.Publish()
        .Channel(channelName)
        .Message(newMessage)
        .Async((result, status) =>
        {
            if (!status.Error)
            {
                Debug.Log(string.Format("Publish Timetoken: {0}", result.Timetoken));
            }
            else
            {
                Debug.Log(status.Error);
                Debug.Log(status.ErrorData.Info);
            }
        });
    }