RemoveTouch() static public method

Remove a touch event from the list.
static public RemoveTouch ( int id ) : void
id int
return void
コード例 #1
0
    static int RemoveTouch(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        int arg0 = (int)LuaScriptMgr.GetNumber(L, 1);

        UICamera.RemoveTouch(arg0);
        return(0);
    }
コード例 #2
0
ファイル: UICamera.cs プロジェクト: kmlkmljkl2/Anarchy
 public void ProcessTouches()
 {
     for (int i = 0; i < Input.touchCount; i++)
     {
         Touch touch = Input.GetTouch(i);
         UICamera.currentTouchID = ((!this.allowMultiTouch) ? 1 : touch.fingerId);
         UICamera.currentTouch   = UICamera.GetTouch(UICamera.currentTouchID);
         bool flag  = touch.phase == TouchPhase.Began || UICamera.currentTouch.touchBegan;
         bool flag2 = touch.phase == TouchPhase.Canceled || touch.phase == TouchPhase.Ended;
         UICamera.currentTouch.touchBegan = false;
         if (flag)
         {
             UICamera.currentTouch.delta = Vectors.v2zero;
         }
         else
         {
             UICamera.currentTouch.delta = touch.position - UICamera.currentTouch.pos;
         }
         UICamera.currentTouch.pos = touch.position;
         UICamera.hoveredObject    = ((!UICamera.Raycast(UICamera.currentTouch.pos, ref UICamera.lastHit)) ? UICamera.fallThrough : UICamera.lastHit.collider.gameObject);
         if (UICamera.hoveredObject == null)
         {
             UICamera.hoveredObject = UICamera.genericEventHandler;
         }
         UICamera.currentTouch.current = UICamera.hoveredObject;
         UICamera.lastTouchPosition    = UICamera.currentTouch.pos;
         if (flag)
         {
             UICamera.currentTouch.pressedCam = UICamera.currentCamera;
         }
         else if (UICamera.currentTouch.pressed != null)
         {
             UICamera.currentCamera = UICamera.currentTouch.pressedCam;
         }
         if (touch.tapCount > 1)
         {
             UICamera.currentTouch.clickTime = Time.realtimeSinceStartup;
         }
         this.ProcessTouch(flag, flag2);
         if (flag2)
         {
             UICamera.RemoveTouch(UICamera.currentTouchID);
         }
         UICamera.currentTouch = null;
         if (!this.allowMultiTouch)
         {
             break;
         }
     }
 }