Beispiel #1
0
        IEnumerator Update()
        {
            while (isActive)
            {
                if (reciever.hasWaitingMessages())
                {
                    reciever.getLastMessages(datas, messages);

                    if (m_Context != null)
                    {
                        using (var frame = m_Context.DoFrame())
                        {
                            for (int i = 0; i < messages.Length; i++)
                            {
                                if (messages[i] != null)
                                {
                                    frame.Write(frameValues[i], getData(messages[i]));
                                }
                                else
                                {
                                    frame.Write(frameValues[i], new Quaternion(0, 0, 0, 0));
                                }
                            }
                        }
                    }

                    currentFrame++;
                }

                yield return(null);
            }
        }