private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
         return;
     }
 }
Ejemplo n.º 2
0
 public void  OnButtonClick()
 {
     if (string.IsNullOrEmpty(link))
     {
         if (!GalleryController.isNullInstance)
         {
             GalleryController.GetInstance.ExitFromGallery();
         }
         else if (!GallryViewCotroller.isNullInstance)
         {
             GallryViewCotroller.GetInstance.ExitFromGallery();
         }
         Destroy(this.gameObject);
     }
     else
     {
         FullViewImageScreen.SetElement(this);
         FullViewImageScreen.ShowFullViewImageScreen(SpriteLoader.GetSpriteFromFile(Link), link);
     }
 }