Example #1
0
        /// <summary>
        /// 设置图片
        /// </summary>
        /// <param name="value"></param>
        private void SetProp_Sprite(UIBehaviour uiBehaviour, object value)
        {
            var img = uiBehaviour as Image;

            if (value is string)
            {
                img.sprite = UFlux.Load <Sprite>((string)value);
            }
            else if (value is Sprite)
            {
                img.sprite = (Sprite)value;
            }
        }
Example #2
0
        /// <summary>
        /// 加载接口
        /// </summary>
        public void Load()
        {
            if (resPath == null)
            {
                return;
            }

            var o = UFlux.Load <GameObject>(resPath);

            this.Transform = GameObject.Instantiate(o).transform;
            this.IsLoad    = true;
            UFlux.InitComponent(this);
            //初始化
            this.Init();
        }