Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (dangerImageT > 0 && showDangerImage == ShowDangerImage.Fadeout)
     {
         dangerImageT     -= dangerImageSpeed;
         dangerImage.color = Vector4.Lerp(new Vector4(1f, 1f, 1f, 0f), new Vector4(1f, 1f, 1f, 1f), dangerImageT);
         if (dangerImageT < 0)
         {
             showDangerImage = ShowDangerImage.Hidden;
         }
     }
 }
Ejemplo n.º 2
0
 public void TriggerDangerImage()
 {
     showDangerImage = ShowDangerImage.Fadeout;
     dangerImageT    = 1;
 }