Example #1
0
            public Log(BaseScope scope, BaseScope otherScope, ScopeDebugger.ScopeEvent scopeEv)
            {
                name = scopeEv.type.ToString() + " Scope";

                color = Color.white;
                if (scopeEv.type == ScopeDebugger.ScopeEvent.Type.Switch)
                {
                    parameters = new string[] { scope.GetType().Name, otherScope.GetType().Name }
                }
                ;
                else
                {
                    parameters = new string[] { scope.GetType().Name }
                };
            }
        }
Example #2
0
        public static void AddIncomingSignal(BaseScope scope, NetworkReader reader)
        {
            int signalType = reader.ReadInt32();

            MethodInfo method = scope.GetType().GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public).FirstOrDefault(m => m.Name.GetHashCode() == signalType);

            ScopeEvents ev = GetOrCreateScopeEvent(scope);

            SignalEvent sigEvent = ev.AddSignalEvent(method, reader, false);

            reader.SeekZero();

            if (OnSignalEvent != null)
            {
                OnSignalEvent(scope, sigEvent);
            }
        }