Exemple #1
0
 public override void OnPointerClick(PointerEventData eventData)      //SendMessage handler
 {
     if (!isDisabled && counter.Counter < animators.Length)
     {
         //print(1);
         if (isFirstClick)
         {
             animators[counter.Counter].Execute(AnimatorContoller.ControlMode.SetBool, "up");
             animator.Execute("up");
             StartCoroutine(StartTimeCoroutine());
         }
         else
         {
             //print(2);
             isFirstClick = true;
             if (isRightClick == true)
             {
                 animator.Execute("up");
                 counter.Add();
                 if (counter.Counter >= animators.Length)
                 {
                     animatorFinish.Execute();
                     isComplite = true;
                     Destroy(gameObject, 1f);
                 }
             }
             else
             {
                 Reset();
             }
             StartCoroutine(BlockCoroutine(1f));
         }
     }
 }
Exemple #2
0
 void OnClickBegin()     //SendMessage handler
 {
     counter.Add(numberToAdd);
 }