private static void Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_Handler(RootSystem.IntPtr result,
                                                                                       RootSystem.IntPtr pNative)
        {
            List <RootSystem.EventHandler <DepthFrameArrivedEventArgs> > callbackList = null;

            Windows_Kinect_DepthFrameArrivedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList);
            lock (callbackList)
            {
                var objThis = NativeObjectCache.GetObject <DepthFrameReader>(pNative);
                var args    = new DepthFrameArrivedEventArgs(result);
                foreach (var func in callbackList)
                {
                    EventPump.Instance.Enqueue(() =>
                    {
                        try
                        {
                            func(objThis, args);
                        }
                        catch
                        {
                        }
                    });
                }
            }
        }
示例#2
0
        private static void Windows_Data_PropertyChangedEventArgs_Delegate_Handler(RootSystem.IntPtr result,
                                                                                   RootSystem.IntPtr pNative)
        {
            List <RootSystem.EventHandler <PropertyChangedEventArgs> > callbackList = null;

            Windows_Data_PropertyChangedEventArgs_Delegate_callbacks.TryGetValue(pNative, out callbackList);
            lock (callbackList)
            {
                var objThis = NativeObjectCache.GetObject <BodyFrameSource>(pNative);
                var args    = new PropertyChangedEventArgs(result);
                foreach (var func in callbackList)
                {
                    EventPump.Instance.Enqueue(() =>
                    {
                        try
                        {
                            func(objThis, args);
                        }
                        catch
                        {
                        }
                    });
                }
            }
        }
示例#3
0
        private static void Microsoft_Kinect_VisualGestureBuilder_TrackingIdLostEventArgs_Delegate_Handler(
            RootSystem.IntPtr result, RootSystem.IntPtr pNative)
        {
            List <RootSystem.EventHandler <TrackingIdLostEventArgs> > callbackList =
                null;

            Microsoft_Kinect_VisualGestureBuilder_TrackingIdLostEventArgs_Delegate_callbacks.TryGetValue(pNative,
                                                                                                         out callbackList);
            lock (callbackList)
            {
                var objThis = NativeObjectCache.GetObject <VisualGestureBuilderFrameSource>(pNative);
                var args    = new TrackingIdLostEventArgs(result);
                foreach (var func in callbackList)
                {
                    EventPump.Instance.Enqueue(() =>
                    {
                        try
                        {
                            func(objThis, args);
                        }
                        catch
                        {
                        }
                    });
                }
            }
        }
示例#4
0
        public void Update(CollectionMap stageMap)
        {
            if (Complete)
            {
                return;
            }

            Complete = stageMap.TryGetValue(Goal, out _);
        }
示例#5
0
        public void Update(CollectionMap monsterMap)
        {
            if (Complete)
            {
                return;
            }

            monsterMap.TryGetValue(MonsterId, out _current);
            Check();
        }
示例#6
0
        public void Update(CollectionMap itemMap)
        {
            if (Complete)
            {
                return;
            }

            itemMap.TryGetValue(ItemId, out _current);
            Check();
        }
示例#7
0
        public void Update(CollectionMap eventMap)
        {
            if (Complete)
            {
                return;
            }

            var key = (int)Event;

            eventMap.TryGetValue(key, out _current);
            Check();
        }