예제 #1
0
    private static GestureArgs ToGestureArgs(FingerEvent args)
    {
        if (null == args)
        {
            return(null);
        }
        GestureArgs e = new GestureArgs();

        e.startPositionX = args.Position.x;
        e.startPositionY = args.Position.y;
        e.positionX      = args.Position.x;
        e.positionY      = args.Position.y;

        e.startTime   = UnityEngine.Time.time;
        e.elapsedTime = 0;
        UnityEngine.Vector3 pos = args.GetTouchToWorldPoint();
        e.gamePosX = pos.x;
        e.gamePosY = pos.y;
        e.gamePosZ = pos.z;
        e.name     = args.Name;

        UnityEngine.GameObject go      = LogicSystem.PlayerSelf;
        UnityEngine.Vector3    srcPos  = pos;
        UnityEngine.Vector3    destPos = pos;
        if (null != go)
        {
            destPos = go.transform.position;
        }
        e.towards = Geometry.GetYAngle(new ArkCrossEngine.Vector2(destPos.x, destPos.z), new ArkCrossEngine.Vector2(srcPos.x, srcPos.z));

        e.moveType = curTouchState;

        return(e);
    }
예제 #2
0
    public void OnFingerDown(FingerEvent eventData)
    {
        if (eventData.Hit.collider == null)
        {
            return;
        }

        mMoveSerrureNo = -1;

        string tag = eventData.Hit.collider.gameObject.tag;

        if (string.IsNullOrEmpty(tag))
        {
            return;
        }

        int i = 0;

        foreach (GameObject serrure in serruresCol)
        {
            if (serrure.tag == tag)
            {
                mMoveSerrureNo = i;
                break;
            }
            i++;
        }
    }
예제 #3
0
 internal static void FireEvent(FingerEvent eventData)
 {
     if (OnFingerEvent != null)
     {
         OnFingerEvent(eventData);
     }
 }
예제 #4
0
    public void Awake()
    {
        GameObject go = GameObject.Find("GlobalScripts");

        if (go != null)
        {
            MLSNetManager = go.GetComponent(typeof(LSNetManager)) as LSNetManager;
            MGSNetManager = go.GetComponent(typeof(GSNetManager)) as GSNetManager;

            MDataTableManager = go.GetComponent(typeof(DataTableManager)) as DataTableManager;
            MGameDataManager  = go.GetComponent(typeof(GameDataManager)) as GameDataManager;
            MHQGeneralManager = go.GetComponent(typeof(HQGeneralManager)) as HQGeneralManager;

            MGUIManager       = go.GetComponent(typeof(GUIManager)) as GUIManager;
            MGUILayoutManager = go.GetComponent(typeof(GUILayoutManager)) as GUILayoutManager;

            MSceneManager = go.GetComponent(typeof(SceneManager)) as SceneManager;

            MPlayerManager = go.GetComponent(typeof(PlayerManager)) as PlayerManager;
            MNpcManager    = go.GetComponent(typeof(NpcManager)) as NpcManager;
            MSkillManager  = go.GetComponent(typeof(SkillManager)) as SkillManager;

            MTaskManager = go.GetComponent <TaskManager>() as TaskManager;

            M3DItemManager = go.GetComponent <EZ3DItemManager>() as EZ3DItemManager;

            MConnectManager      = go.GetComponent <NativeConnectManager>() as NativeConnectManager;
            MRepeateEventManager = go.GetComponent <RepeateEventManager>() as RepeateEventManager;

            MAffectorManager = go.GetComponent <AffectorManager>() as AffectorManager;
            MEffectManager   = go.GetComponent(typeof(EffectManager)) as EffectManager;
            MSoundManager    = go.GetComponent(typeof(SoundManager)) as SoundManager;

            MCopySweepManager = go.GetComponent(typeof(CopySweepManager)) as CopySweepManager;

            MFingerEvent        = go.GetComponent <FingerEvent>() as FingerEvent;
            MCameraController   = go.GetComponentInChildren <CameraController>() as CameraController;
            MCamTrackController = go.GetComponentInChildren <CameraTrackController>() as CameraTrackController;

            MTeachManager    = go.GetComponent(typeof(TeachManager)) as TeachManager;
            MGUIDataManager  = go.GetComponent(typeof(GUIDataManager)) as GUIDataManager;
            MPushDataManager = go.GetComponent(typeof(PushDataManager)) as PushDataManager;

            MBundleManager      = go.GetComponent(typeof(BundleManager)) as BundleManager;
            MResourceManager    = go.GetComponent <ResourceMgr>() as ResourceMgr;
            MPortDefenseManager = go.GetComponent <PortDefenseManager>() as PortDefenseManager;
            MPortVieManager     = go.GetComponent <PortVieManager>() as PortVieManager;
            MJunHunManager      = go.GetComponent <JunHunManager>() as JunHunManager;
            MJobManager         = go.GetComponent <JobManager>() as JobManager;
            mArenaInfoManager   = go.GetComponent <ArenaInfoManager> () as ArenaInfoManager;
            mProduceManager     = go.GetComponent <ProduceManager>() as ProduceManager;
            mEvolutionManager   = go.GetComponent <EvolutionManager>() as EvolutionManager;
            mShopDataManager    = go.GetComponent <ShopDataManager>() as ShopDataManager;
            MStarter            = go.GetComponent <Starter>();
        }
    }
        private async void ProcessorGPIOEvents_NotifyEvent(object sender, FingerEvent args)
        {
            await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
            { // your code should be here
                m_DataSets.Insert(0, args);

                while (m_DataSets.Count > 50)
                {
                    m_DataSets.RemoveAt(50);
                }
            });
        }
예제 #6
0
 private void OnSkillFingerEvent(FingerEvent finger)
 {
     if (SupportRotateByHold && IsExecuting() && "OnTwoFingerMove" == finger.Name)
     {
         TargetPos = finger.GetTouchToWorldPoint();
         AdjustTargetPos();
     }
     if (SupportRotateByHold && IsExecuting() && "OnTwoFingerDown" == finger.Name)
     {
         TargetPos = finger.GetTouchToWorldPoint();
         AdjustTargetPos();
     }
 }
예제 #7
0
 private void OnFingerEvent(FingerEvent fevent)
 {
     if (TouchManager.GestureEnable)
     {
         if (fevent.Finger.IsDown && !fevent.Finger.WasDown)
         {
             ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_finger_event", "ui", fevent.Position, true);
         }
         else if (fevent.Finger.WasDown && !fevent.Finger.IsDown)
         {
             ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_finger_event", "ui", fevent.Position, false);
         }
     }
 }
예제 #8
0
        private void OnFingerEvent(CocoGestureType gestureType, FingerEvent fingerEvent)
        {
            if (ShouldIgnoreGesture(gestureType, fingerEvent.Position))
            {
                return;
            }
            if (!StartGestureProcess(gestureType))
            {
                return;
            }

            ProcessGestureData(gestureType, fingerEvent);
            EndGestureProcess(gestureType);
        }
        FingerEvent createSensorEvent(string FirstName, string SecondName, int MatchScore, int fingerId, string fingerType, int sensorState, string cmdsensorState)
        {
            FingerEvent eventSet = new FingerEvent();

            eventSet.FirstName      = FirstName;
            eventSet.SecondName     = SecondName;
            eventSet.MatchScore     = MatchScore;
            eventSet.FingerID       = fingerId;
            eventSet.EventType      = fingerType;
            eventSet.SensorState    = sensorState;
            eventSet.SensorTxtState = cmdsensorState;
            System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
            eventSet.SensorId = enc.GetBytes(m_SensorID);
            return(eventSet);
        }
예제 #10
0
    void OnFingerDown(FingerEvent e)
    {
        if (e.Selection == null || e.Selection.gameObject != gameObject)
        {
            return;
        }

        if (gameOver)
        {
            sceneManager.SendMessage("OnDefaultDown");
        }
        else if (playerControl != null)
        {
            playerControl.SendMessage("OnDefaultDown");
        }
    }
예제 #11
0
 private void Awake()
 {
     if (_collider == null)
     {
         _collider = GetComponent <Collider2D>();
     }
     if (onSelect == null)
     {
         onSelect = new FingerEvent();
     }
     if (onDeSelect == null)
     {
         onDeSelect = new FingerEvent();
     }
     selected = false;
 }
예제 #12
0
    static int get_Raycast(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FingerEvent       obj = (FingerEvent)o;
            ScreenRaycastData ret = obj.Raycast;
            ToLua.PushValue(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Raycast on a nil value" : e.Message));
        }
    }
예제 #13
0
    static int get_Name(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FingerEvent obj = (FingerEvent)o;
            string      ret = obj.Name;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Name on a nil value" : e.Message));
        }
    }
예제 #14
0
 private void OnSkillFingerEvent(FingerEvent finger)
 {
     if (m_IsEnterMissle && IsExecuting() && "OnFingerMove" == finger.Name)
     {
         //Debug.Log("OnSkillFingerEvent OnFingerMove!");
         TargetPos = finger.GetTouchToWorldPoint();
         //TriggerImpl.SetFacePos(this.gameObject, TargetPos);
         CreateMissle(TargetPos, true);
     }
     if (m_IsEnterMissle && IsExecuting() && "OnFingerDown" == finger.Name)
     {
         //Debug.Log("OnSkillFingerEvent SupportHoldSkillByFinger OnFingerDown!");
         TargetPos = finger.GetTouchToWorldPoint();
         //TriggerImpl.SetFacePos(this.gameObject, TargetPos);
         CreateMissle(TargetPos, false);
     }
 }
예제 #15
0
    static int get_Detector(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FingerEvent         obj = (FingerEvent)o;
            FingerEventDetector ret = obj.Detector;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Detector on a nil value" : e.Message));
        }
    }
예제 #16
0
    static int get_Selection(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FingerEvent            obj = (FingerEvent)o;
            UnityEngine.GameObject ret = obj.Selection;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Selection on a nil value" : e.Message));
        }
    }
예제 #17
0
    public static void FireEvent(FingerEvent eventData)
    {
        if (!TouchEnable)
        {
            return;
        }

        GestureArgs e = ToGestureArgs(eventData);

        LogicSystem.FireGestureEvent(e);

        if (OnFingerEvent != null)
        {
            OnFingerEvent(eventData);
        }

        //Debug.LogWarning("...input event : " + eventData.Name + ", State : " + curTouchState.ToString());
    }
예제 #18
0
 private void OnSkillFingerEvent(FingerEvent finger)
 {
     if (!IsActive() || m_ExSkillState != ExSkillState.kHolding)
     {
         return;
     }
     if ("OnFingerDown" == finger.Name)
     {
         Vector3           targetPos = finger.GetTouchToWorldPoint();
         List <GameObject> objs      = finger.GetRayObjectsByLayerName("Character");
         DamageObjects(objs);
     }
     if ("OnFingerMove" == finger.Name)
     {
         Vector3           targetPos = finger.GetTouchToWorldPoint();
         List <GameObject> objs      = finger.GetRayObjectsByLayerName("Character");
         DamageObjects(objs);
     }
 }
예제 #19
0
    public void OnFingerDown( FingerEvent eventData )
    {
        if( eventData.Hit.collider == null )
            return;

        mMoveSerrureNo = -1;

        string tag = eventData.Hit.collider.gameObject.tag;
        if( string.IsNullOrEmpty( tag ) )
            return;

        int i = 0;
        foreach( GameObject serrure in serruresCol ) {
            if( serrure.tag == tag ) {
                mMoveSerrureNo = i;
                break;
            }
            i++;
        }
    }
예제 #20
0
 private void OnFingerEvent(FingerEvent args)
 {
     if (null == args)
     {
         return;
     }
     if (TouchType.Regognizer != TouchManager.curTouchState)
     {
         return;
     }
     if (GestureEvent.OnFingerMove.ToString() == args.Name)
     {
         if (TouchManager.GestureEnable)
         {
             return;
         }
         if (args.Finger.IsDown && args.Finger.IsMoving)
         {
             if (args.Finger.DistanceFromStart > validLength)
             {
                 Vector3 curPos = Camera.main.ScreenToWorldPoint(new Vector3(args.Position.x, args.Position.y, depth));
                 if (null == obj)
                 {
                     obj = GameObject.Instantiate(original, curPos, Quaternion.identity) as GameObject;
                 }
                 if (null != obj)
                 {
                     obj.transform.position = curPos;
                 }
             }
         }
     }
     else if (GestureEvent.OnFingerUp.ToString() == args.Name)
     {
         if (args.Finger.WasDown && null != obj)
         {
             GameObject.Destroy(obj, duration);
             obj = null;
         }
     }
 }
예제 #21
0
    private void OnFingerEvent(FingerEvent args)
    {
        FingerMotionEvent motionEventArgs = args as FingerMotionEvent;

        if (null != motionEventArgs)
        {
            // ui collider clicked
            if (UICamera.hoveredObject == m_HeroCollider)
            {
                // only rotate on finger down
                if (motionEventArgs.Phase == FingerMotionPhase.Updated)
                {
                    // rotate left or right
                    if (motionEventArgs.Position.x - m_LastFingerPos.x > 0.5)
                    {
                        OnHeroRotate(m_CurHeroId, -1);
                    }
                    else if (motionEventArgs.Position.x - m_LastFingerPos.x < -0.5)
                    {
                        OnHeroRotate(m_CurHeroId, 1);
                    }
                    else
                    {
                    }
                }
                m_LastFingerPos = motionEventArgs.Position;
            }
            return;
        }

        FingerDownEvent downEventArgs = args as FingerDownEvent;

        if (downEventArgs != null)
        {
            if (UICamera.hoveredObject == m_HeroCollider)
            {
                return;
            }
            return;
        }
    }
예제 #22
0
 private void Awake()
 {
     if (_collider == null)
     {
         _collider = GetComponent <Collider2D>();
     }
     if (onDragStart == null)
     {
         onDragStart = new FingerEvent();
     }
     if (onDrag == null)
     {
         onDrag = new FingerEvent();
     }
     if (onDragEnd == null)
     {
         onDragEnd = new FingerEvent();
     }
     dragging       = false;
     draggingFinger = null;
 }
예제 #23
0
    public static void FireEvent(FingerEvent eventData)
    {
        if (!TouchEnable)
        {
            return;
        }

        int scene_id = WorldSystem.Instance.GetCurSceneId();

        if (scene_id > 0)
        {
            GestureArgs e = ToGestureArgs(eventData);
            LogicSystem.FireGestureEvent(e);
        }

        if (OnFingerEvent != null)
        {
            OnFingerEvent(eventData);
        }

        //Debug.LogWarning("...input event : " + eventData.Name + ", State : " + curTouchState.ToString());
    }
예제 #24
0
    static int _CreateFingerEvent(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                FingerEvent obj = new FingerEvent();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: FingerEvent.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
예제 #25
0
파일: Main.cs 프로젝트: moto2002/snowbattle
 void OnPressDown(FingerEvent fingerEvent)
 {
     MainGame.Singleton.OnPressDown(fingerEvent.Finger.Index, fingerEvent.Position);
 }
        void Update_SEN0188_NotifyChangeState(IPropertySet Outputpropertys)
        {
            ProcessGPIOEvents ev;

            Object Valout;
            Int16  state               = -1;
            String cmdState            = "...";
            bool   doactFilledSensorId = false;

            if (Outputpropertys.TryGetValue("FingerPrint.CMDState", out Valout))
            {
                if (Valout != null)
                {
                    state = (Int16)Valout;
                }
            }

            if (Outputpropertys.TryGetValue("FingerPrint.CMDTextState", out Valout))
            {
                String cmd = Valout as String;
                if (cmd != null)
                {
                    cmdState = cmd;
                }
            }


            if (Outputpropertys.TryGetValue("FingerPrint.CMD", out Valout))
            {
                if (Valout != null)
                {
                    Int32 CMD = (Int32)Valout;

                    if (CMD == Connector_SEN0188_CMDs.getFingerPrintCmd("_doFingerSensorInitialize"))
                    {
                        if (state == 0)
                        {
                            m_Environment.SensorInitialized = true;
                            //   m_SensorInitialized = true;
                            doactFilledSensorId = true;
                        }
                    }
                    else if (CMD == Connector_SEN0188_CMDs.getFingerPrintCmd("_doFingerAutoVerifiying"))
                    {
                        if (m_EventQueue.Count > 0)
                        {
                            ev = m_EventQueue.Dequeue(); // get Event
                        }
                        else
                        {
                            return;
                        }

                        if (state == 0)
                        {
                            if (Outputpropertys.TryGetValue("FingerPrint.FingerID", out Valout))
                            {
                                if (Valout != null)
                                {
                                    UInt16 fingerId = (UInt16)Valout;
                                    if (Outputpropertys.TryGetValue("FingerPrint.Search_MatchScore", out Valout))
                                    {
                                        UInt16    MatchScore = (UInt16)Valout;
                                        DBDataSet dataset    = m_SEN0188SQLite.getDatabyId(fingerId);
                                        if (dataset != null)
                                        {
                                            FingerEvent eventSet;
                                            if (dataset.AccessRights_Bit0 || (dataset.AccessRights & ev.AccessRights) != 0) // Master Bit
                                            {
                                                ev.UpdateState(0);                                                          // update inativ setzen

                                                ev.ProcessOutput();

                                                cmdState = String.Format("Permission to Access: {0}", ev.Ident);
                                                eventSet = createSensorEvent(dataset.FirstName, dataset.SecondName, MatchScore, fingerId, ev.Ident, state, cmdState);

                                                ProcessGPIOEvents evOk = getProcessGPIOEventsByIdent("State_OK");
                                                if (evOk != null)
                                                {
                                                    evOk.ProcessOutput();
                                                }
                                                ev.UpdateState(1); // update aktiv setzen
                                            }
                                            else
                                            {
                                                cmdState = String.Format("no Permission to Access: {0}", ev.Ident);
                                                state    = -2;
                                                eventSet = createSensorEvent(dataset.FirstName, dataset.SecondName, MatchScore, fingerId, ev.Ident, state, cmdState);

                                                ProcessGPIOEvents evNoPermiss = getProcessGPIOEventsByIdent("State_NoPermiss");
                                                if (evNoPermiss != null)
                                                {
                                                    evNoPermiss.UpdateState(0); // update inativ setzen
                                                    evNoPermiss.ProcessOutput();
                                                    evNoPermiss.UpdateState(1); // update aktiv setzen
                                                }
                                            }

                                            bool insert = m_FingertEventDatabase.InsertFingerEvent(eventSet);
                                            NotifyEvent?.Invoke(this, eventSet);
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            FingerEvent       eventSet     = createSensorEvent("John", "Doe", -1, -1, ev.Ident, state, cmdState);
                            ProcessGPIOEvents evStateError = getProcessGPIOEventsByIdent("State_Error");
                            if (evStateError != null)
                            {
                                evStateError.UpdateState(0); // update inativ setzen
                                evStateError.ProcessOutput();
                                evStateError.UpdateState(1); // update aktiv setzen
                            }
                            ;

                            bool insert = m_FingertEventDatabase.InsertFingerEvent(eventSet);
                            NotifyEvent?.Invoke(this, eventSet);
                        }
                    }
                }
            }

            if (doactFilledSensorId)
            {
                //   m_SensorId.Clear();
                if (Outputpropertys.TryGetValue("FingerPrint.SensorID", out Valout))
                {
                    if (Valout != null)
                    {
                        byte[] array = Valout as byte[];
                        if (array != null)
                        {
                            m_SensorID = System.Text.Encoding.UTF8.GetString(array, 0, array.Length);
                        }
                    }
                }
            }
        }
예제 #27
0
 void Awake()
 {
     Instance = this;
 }
        async private void GPIOConnector_ChangeGPIOs(object sender, IPropertySet propertys)
        {
            await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
            { // your code should be here
                m_GPIOEnvironmentConnectors.ProcessPropertysFromGPIOConnector(propertys);

                var con = m_GPIOEnvironmentConnectors.getGPIOOConnectorByOutputPropertySet(propertys);

                if (con == null)
                {
                    return;
                }

                if (m_ProcessGPIOEvents == null)
                {
                    return;
                }

                for (int i = 0; i < m_ProcessGPIOEvents.Count; i++)
                {
                    ProcessGPIOEvents item = m_ProcessGPIOEvents[i];
                    if (item.InputActiv())
                    {
                        removeOldEvents(); // ältere löschen, welche nach 5 sec. nicht beantwortet waren

                        if ((item.AccessRights > 0) && m_Environment.ConnectorSEN0188Enable)
                        {
                            if (m_Environment.SensorConnecorInitialized)
                            {
                                ProcessGPIOEvents Processitem = new ProcessGPIOEvents(item);
                                m_EventQueue.Enqueue(Processitem);
                                SensorCMDs.VerifyFingerId(m_Environment.SensorInputServiceConnectorConfig);
                            }
                            else
                            {
                                string cmdState               = "Fingerprint Connector not initialized!";
                                int state                     = -1;
                                FingerEvent eventSet          = createSensorEvent("John", "Doe", -1, -1, item.Ident, state, cmdState);
                                System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
                                eventSet.SensorId             = enc.GetBytes(m_SensorID);
                                bool insert                   = m_FingertEventDatabase.InsertFingerEvent(eventSet);
                                NotifyEvent?.Invoke(this, eventSet);
                            }
                        }
                        else
                        {
                            item.UpdateState(0);
                            item.ProcessOutput();
                            item.UpdateState(1);
                            int state                     = -1;
                            string cmdState               = "no FingerSensor used";
                            FingerEvent eventSet          = createSensorEvent("John", "Doe", -1, -1, item.Ident, state, cmdState);
                            System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
                            eventSet.SensorId             = enc.GetBytes(m_SensorID);
                            bool insert                   = m_FingertEventDatabase.InsertFingerEvent(eventSet);
                            NotifyEvent?.Invoke(this, eventSet);
                        }
                    }
                }
            });
        }
예제 #29
0
        void Update_SEN0188_NotifyChangeState(IPropertySet Outputpropertys)
        {
            ProcessFingerEvent ev = m_EventQueue.Dequeue(); // get Event

            Object Valout;
            Int16  state               = -1;
            String cmdState            = "...";
            bool   doactFilledSensorId = false;

            if (Outputpropertys.TryGetValue("FingerPrint.CMDState", out Valout))
            {
                if (Valout != null)
                {
                    state = (Int16)Valout;
                }
            }

            if (Outputpropertys.TryGetValue("FingerPrint.CMDTextState", out Valout))
            {
                String cmd = Valout as String;
                if (cmd != null)
                {
                    cmdState = cmd;
                }
            }


            if (Outputpropertys.TryGetValue("FingerPrint.CMD", out Valout))
            {
                if (Valout != null)
                {
                    Int32 CMD = (Int32)Valout;

                    if (CMD == Connector_SEN0188_CMDs.getFingerPrintCmd("_doFingerSensorInitialize"))
                    {
                        if (state == 0)
                        {
                            //        SensorInitialized = true;
                            doactFilledSensorId = true;
                        }
                    }
                    else if (CMD == Connector_SEN0188_CMDs.getFingerPrintCmd("_doFingerAutoVerifiying"))
                    {
                        if (state == 0)
                        {
                            if (Outputpropertys.TryGetValue("FingerPrint.FingerID", out Valout))
                            {
                                if (Valout != null)
                                {
                                    UInt16 fingerId = (UInt16)Valout;
                                    if (Outputpropertys.TryGetValue("FingerPrint.Search_MatchScore", out Valout))
                                    {
                                        UInt16    MatchScore = (UInt16)Valout;
                                        DBDataSet dataset    = m_SEN0188SQLite.getDatabyId(fingerId);
                                        if (dataset != null)
                                        {
                                            if (dataset.AccessRights_Bit0 || (dataset.AccessRights & ev.AccessRights) != 0) // Master Bit
                                            {
                                                for (int i = 0; i < ev.GPIOOutputs.Count; i++)
                                                {
                                                    //                         ev.GPIOOutputs[i].GPIOEnvironmentConnector.UpdateState(0);
                                                    ev.GPIOOutputs[i].GPIOObject.SetValue = (ev.GPIOOutputs[i].GPIOObject.InitValue > 0) ? 1:0;
                                                    ev.GPIOOutputs[i].GPIOEnvironmentConnector.UpdateInputPropertySets(ev.GPIOOutputs[i].GPIOObject);
                                                }

                                                FingerEvent eventSet = new FingerEvent();
                                                eventSet.FirstName      = dataset.FirstName;
                                                eventSet.SecondName     = dataset.SecondName;
                                                eventSet.MatchScore     = MatchScore;
                                                eventSet.FingerID       = fingerId;
                                                eventSet.EventType      = 0;
                                                eventSet.SensorState    = state;
                                                eventSet.SensorTxtState = cmdState;
                                                System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
                                                eventSet.SensorId = enc.GetBytes(m_SensorID);

                                                bool insert = m_FingertEventDatabase.InsertFingerEvent(eventSet);

                                                ConfigProcessItem outstate = m_ConfigProcessItems.getConfigItemByIdent("State_OK");
                                                if (outstate != null)
                                                {
                                                    for (int i = 0; i < outstate.GPIOOutputProcessItems.Count; i++)
                                                    {
//                                                        outstate.GPIOOutputProcessItems[i].GPIOName
                                                    }
                                                }


                                                //             GetEventData();
                                            }
                                            else
                                            {
                                                ConfigProcessItem outstate = m_ConfigProcessItems.getConfigItemByIdent("State_NoPermiss");
                                                if (outstate != null)
                                                {
                                                    for (int i = 0; i < outstate.GPIOOutputProcessItems.Count; i++)
                                                    {
                                                        //                                                        outstate.GPIOOutputProcessItems[i].GPIOName
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }

            if (doactFilledSensorId)
            {
                //   m_SensorId.Clear();
                if (Outputpropertys.TryGetValue("FingerPrint.SensorID", out Valout))
                {
                    if (Valout != null)
                    {
                        byte[] array = Valout as byte[];
                        if (array != null)
                        {
                            m_SensorID = System.Text.Encoding.UTF8.GetString(array, 0, array.Length);
                        }
                    }
                }
            }
        }
예제 #30
0
 private void Awake()
 {
     Instance = this;
 }
예제 #31
0
파일: Main.cs 프로젝트: moto2002/snowbattle
    void OnPressUp(FingerEvent fingerEvent)
    {
        FingerUpEvent upEvent = fingerEvent as FingerUpEvent;

        MainGame.Singleton.OnPressUp(fingerEvent.Finger.Index, fingerEvent.Position, upEvent.TimeHeldDown);
    }