Exemple #1
0
 public override void Hide()
 {
     Debug.Log("hide");
     if (mImage == null)
     {
         mImage = canvas.GetComponent <Image>();
     }
     //float alpha = image.color.a;
     mImage.color = UITool.ChangeColor(mImage.color, 256, 256, 256, 0, 0.1f);
     if (mImage.color.a <= 0)
     {
         IsHideComplete = true;
         canvas.SetActive(false);
         //canvas.GetComponent<Canvas>().sortingOrder = 0;
     }
 }
Exemple #2
0
 public override void Hide()
 {
     if (mImage == null)
     {
         mImage = canvas.GetComponent <Image>();
     }
     //float alpha = mImage.color.a;
     //alpha -= Time.deltaTime;
     mImage.color = UITool.ChangeColor(mImage.color, 256, 256, 255, 0, 0.1f);
     if (mImage.color.a <= 0)
     {
         IsHideComplete = true;
         //canvas.GetComponent<Canvas>().sortingOrder = 0;
         canvas.SetActive(false);
     }
 }
Exemple #3
0
 public override void Show()
 {
     if (!canvas.activeSelf)
     {
         Debug.Log(canvas);
         canvas.SetActive(true);
         //canvas.GetComponent<Canvas>().sortingOrder = 1;
     }
     IsHideComplete = false;
     if (mImage == null)
     {
         mImage = canvas.GetComponent <Image>();
     }
     //float alpha = mImage.color.a;
     //alpha += Time.deltaTime;
     mImage.color = UITool.ChangeColor(mImage.color, 256, 256, 256, 255, 0.1f);
 }