Пример #1
0
        /// <summary>Process an incoming packet and raise the appropriate events</summary>
        /// <param name="sender">The sender</param>
        /// <param name="e">The EventArgs object containing the packet data</param>
        protected void SimulatorViewerTimeMessageHandler(object sender, PacketReceivedEventArgs e)
        {
            SimulatorViewerTimeMessagePacket time = (SimulatorViewerTimeMessagePacket)e.Packet;

            sunPhase       = time.TimeInfo.SunPhase;
            sunDirection   = time.TimeInfo.SunDirection;
            sunAngVelocity = time.TimeInfo.SunAngVelocity;
            timeOfDay      = time.TimeInfo.UsecSinceStart;
            // TODO: Does anyone have a use for the time stuff?
        }
Пример #2
0
        /// <summary>
        /// Get sim time from the appropriate packet
        /// </summary>
        /// <param name="packet">Incoming SimulatorViewerTimeMessagePacket from SL</param>
        /// <param name="simulator">Unused</param>
        private void TimeMessageHandler(Packet packet, Simulator simulator)
        {
            SimulatorViewerTimeMessagePacket time = (SimulatorViewerTimeMessagePacket)packet;

            sunPhase       = time.TimeInfo.SunPhase;
            sunDirection   = time.TimeInfo.SunDirection;
            sunAngVelocity = time.TimeInfo.SunAngVelocity;

            // TODO: Does anyone have a use for the time stuff?
        }