Exemplo n.º 1
0
        public virtual void Init(ActBase a)
        {
            actPic = a as _show_pic;
            XmlPic2D xmlPic = XmlStage.GetAsset2D(actPic.assetID);

            if (xmlPic == null)
            {
                Debug.LogError("显示图片错误,找不到文件按  " + actPic.assetID + "in stage " + XmlStage.curStage.id);
                return;
            }
            xmlPic.InitSprite();
            Sprite tex = xmlPic.PicNormal;// Resources.Load<Sprite>(XmlStage.filePath +  btn.picNormal.fileName);

            InitPos(tex, actPic.pos, xmlPic.scale, actPic.angle);
        }
Exemplo n.º 2
0
        public override void Init(ActBase act)
        {
            actButton = act as _show_button;
            strEvent  = actButton.strEvent;

            XmlPic2D xml = XmlStage.GetAsset2D(actButton.assetID);

            if (xml != null)
            {
                xml.InitSprite();

                strEvent = actButton.strEvent;

                Sprite tex = xml.PicNormal;

                InitPos(tex, actButton.pos, xml.scale, 0);
            }
        }