Esempio n. 1
0
        public static Button CreateImageButton(string icon, Transform parent, Action action, string sound = "click")
        {
            Button act = CreateImageButton(SpriteHelper.Load(icon), parent, action, sound);

            act.name = icon;
            return(act);
        }
Esempio n. 2
0
        public static Image CreateImageCounter(Transform parent, int count, string icon)
        {
            Image act = Instantiate(Get().imageCounter, parent);

            act.name = icon + count.ToString();
            act.GetComponent <Image>().sprite = SpriteHelper.Load(icon);
            act.transform.GetChild(0).GetComponent <Text>().text = count.ToString();
            return(act);
        }
Esempio n. 3
0
 public Button AddImageTextButton(string title, string icon, Action action, string sound = "click")
 {
     return(AddImageTextButton(title, SpriteHelper.Load(icon), action, sound));
 }
Esempio n. 4
0
 public static GameObject CreateImageLabel(Transform parent, string title, string icon)
 {
     return(CreateImageLabel(parent, title, SpriteHelper.Load(icon)));
 }