unity3D EventDelegate 传参 加载atlas

来源:互联网 发布:性能最好的php框架 编辑:程序博客网 时间:2024/06/06 07:33
 UIButton buttonBg1 = goTipsBg.GetComponent<UIButton>();
            EventDelegate ev = new EventDelegate(this, "ButtonBgOnClick");
            ev.parameters[0].obj = pbtn;

            EventDelegate.Add(buttonBg1.onClick, ev);


//、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、

if (atlasMain == null)
        {
            atlasMain = Resources.Load("Atlas/main", typeof(UIAtlas)) as UIAtlas;
        }


        spritIcon.atlas = atlasMain;
        spritIcon.spriteName = Util.toCoinString(mb.coinType);

0 0
原创粉丝点击