Exemplo n.º 1
0
    public void UpdateImage()
    {
        Image image = this.gameObject.GetComponent <Image>();


        CardImageHandler cardImageHandler = CardImageHandler.instance;
        Sprite           newSprite        = cardImageHandler.GetSprite(role);

        image.sprite = newSprite;
    }
Exemplo n.º 2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }