- Home /
 
               Question by 
               RaviiKmr · Jul 07, 2017 at 07:52 PM · 
                uiguifunctionevent triggering  
              
 
              Function in the Event Trigger of a UI element does not work properly

The Pointer Up function is not working.
This is the function. It keeps repeating the Sword() function.
 public void Sword(){
 
                 if (!attacking) {
                     attacking = true;
                         
                     attackTrigger.enabled = true;
                 }
                 
                 anim.SetBool ("Attacking", attacking);
         }
 public void ResetSword(){
             attackCoolDown = 3f;
             attackTimer = attackCoolDown;
 
             if (attackTimer > 0) {
                 attackTimer -= Time.deltaTime;
             } else {
                 attacking = false;
                 attackTrigger.enabled = false;
             }
                 
             anim.SetBool ("Attacking", attacking);
     }
 }
 
 
                 
                untitled.jpg 
                (66.9 kB) 
               
 
              
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
How to detect if UI button is clicked? 3 Answers
OnGUI order, function executed before OnGUIs 0 Answers
Load/Change scene with UI Button 1 Answer
All UI's appear as black 0 Answers
Setting GUI color alpha math issue. 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                