Ejemplo n.º 1
0
        public void ProcessMessage(NetworkMessage msg)
        {
#if UNITY_EDITOR && SCOPE_DEBUGGING
            // log incoming signal
            ScopeDebugger.AddIncomingSignal(this, msg.reader);

            msg.reader.SeekZero();
#endif

            // if not pause, invoke the signal immediately
            if (!_isPaused)
            {
                MethodBindingCache.Invoke(this, cachedType, msg.reader);
            }
            // if paused, enqueue paused signal for later processing
            else
            {
                SignalInvocation inv = MethodBindingCache.GetMessageInvocation(cachedType, msg.reader);
                pausedMessages.Enqueue(inv);
            }
        }
Ejemplo n.º 2
0
 protected void Initialize()
 {
     cachedType = GetType();
     MethodBindingCache.BindScope(cachedType);
 }