Ejemplo n.º 1
0
 public void OnDrawButtonHold()
 {
     buttonReleased = false;
     holdTime       = Time.time;
     StartCoroutine(ButtonHoldTimer((float time) => {
         float elapsedTime = Time.time - time;
         if (elapsedTime > 0.5f)
         {
             drawPanelScript.ToggleOpen();
             return(true);
         }
         if (buttonReleased)
         {
             if (drawPanelScript.isOpen)
             {
                 drawPanelScript.CollapsePanel();
             }
             else
             {
                 GameManager.instance.ToggleDrawMode();
                 if (!GameManager.instance.drawMode)
                 {
                     selectorControlsScript.Close();
                 }
             }
             return(true);
         }
         return(false);
     }));
 }