Exemple #1
0
 public virtual void OnDoubleClick(HPacket packet)
 {
     if (DisableEventHandlers == false)
     {
         try { OnDoubleClickEvent.Invoke(this, packet); } catch { }; //Invoke event handler
     }
 }
Exemple #2
0
    private void CheckDoubleClick()
    {
        if (Input.GetMouseButtonDown(0))
        {
            _time2 = Time.realtimeSinceStartup;

            if (_time2 - _time1 < 0.2f)
            {
                OnDoubleClickEvent?.Invoke();
            }
            _time1 = _time2;
        }
    }