public void BeginClicking()
 {
     loadingCircle.Reset();
     loadingCircle.BeginLoading();
     //handCursor.transform.localScale = Vector3.one*0.75f;
     LeanTween.scale(handCursor.rectTransform, Vector3.one * 0.5f, loadingCircle.totalTime).setEase(LeanTweenType.easeInSine);
     //LeanTween.alpha(handCursor.rectTransform,0f,loadingCircle.totalTime*0.5f);
     Invoke("ClickIfStillHighlighted", loadingCircle.totalTime + (loadingCircle.totalTime / 8f));
 }
Beispiel #2
0
 //This function is called whenever the cursor enters the bounds of a button
 public void BeginClicking()
 {
     //Reset the loading circle back to the beginning
     loadingCircle.Reset();
     //Tell it to start tweening
     loadingCircle.BeginLoading();
     //Tween the cursor scale down as if it were pressing the button
     LeanTween.scale(handCursor.rectTransform, Vector3.one * 0.5f, loadingCircle.totalTime).setEase(LeanTweenType.easeInSine);
     //Invoke a method in the future to click the button if it is still highlighted (the total time the loading circle takes)
     Invoke("ClickIfStillHighlighted", loadingCircle.totalTime + (loadingCircle.totalTime / 8f));
 }