コード例 #1
0
 public void OnDrag(PointerEventData eventData)
 {
     if (!this.disable && (this.mTouchID == eventData.pointerId))
     {
         if (!this.touchdown)
         {
             this.child.gameObject.SetActive(true);
             Vector3 pos = this.GetPos((Vector3)eventData.get_position());
             this.touchdownpos        = pos;
             this.touchdown           = true;
             this.child.localPosition = pos;
             this.Origin = pos;
             ProfilerHelper.BeginSample("Circle drag 1", Array.Empty <object>());
             this.DealDrag(this.Origin, true);
             if (On_JoyTouchStart != null)
             {
                 On_JoyTouchStart(this.m_Data);
             }
             ProfilerHelper.EndSample();
         }
         this.bDrag = true;
         ProfilerHelper.BeginSample("Circle drag 2", Array.Empty <object>());
         this.DealDrag(this.GetPos((Vector3)eventData.get_position()), true);
         if (On_JoyTouching != null)
         {
             On_JoyTouching(this.m_Data);
         }
         ProfilerHelper.EndSample();
     }
 }
コード例 #2
0
 private void Update()
 {
     ProfilerHelper.BeginSample("udpate1");
     tcs = new TaskCompletionSource <bool>();
     ProfilerHelper.EndSample();
 }