- Home /
How I can attach an image or animation on the uiImage fill amount?
I have a burning fuse, i am burning the fuse using the UIImage. fill amount
i want at the end of the fill amount to attach a uiimage animation that is a burning fire.
how i can do that? With my following code start synchronised but very soon gets desynchronised the fire movement and the fill amount.
What i am missing? any suggestions?
     //----------------------------------------------------------------------------
     // Unity Lifecycle:
     //----------------------------------------------------------------------------
 
     void Update()
     {
         if(start)
         {
             timer += Time.deltaTime * increasedSpeed;
             burnSpeed = (Time.deltaTime * increasedSpeed);
 
             if(timer < totalBurnTime)
             {
                 fuse.fillAmount = timer / totalBurnTime;
             
                 fireRectTransform.anchoredPosition = Vector2.Lerp(fireRectTransform.anchoredPosition,burnPosition,burnSpeed / totalBurnTime);
             }
             else 
             {
                 Explode();
             }
         }
     }
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
How to animate UI rect transform which works for all resolutions 1 Answer
Animating a Sprite Image in UI from Code 1 Answer
Child Image of Animated Panel Shaking 1 Answer
UI Elements Move Animation Using iTween 2 Answers
Detect 2d items only on areas where the sprite covers, and not the whole box! 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                