Exemplo n.º 1
0
 public void ClickHandler(CommonHeroIcon commonHeroIcon)
 {
     if (onClickHandler != null)
     {
         onClickHandler(commonHeroIcon);
         AudioController.instance.PlayAudio(AudioController.SELECT, false);
     }
 }
Exemplo n.º 2
0
        public static CommonHeroIcon CreateBigIcon(Transform parent)
        {
            CommonHeroIcon commonHeroIcon = GameObject.Instantiate <GameObject>(ResMgr.instance.Load <GameObject>(PREFAB_BIG_PATH)).GetComponent <CommonHeroIcon>();

            if (parent != null)
            {
                commonHeroIcon.transform.SetParent(parent, false);
                commonHeroIcon.transform.localPosition = Vector3.zero;
            }
            return(commonHeroIcon);
        }