Beispiel #1
0
        public void FBOnShow(FBToolType type, string des, string spriteName = null, Texture2D tex = null)
        {
            f_type_enum        = type;
            f_cachedes_str     = des;
            f_cachedspname_str = spriteName;
            f_cached_tex2D     = tex;

            f_current_pivot = FBGetPivot();
            Vector3 localPos = FBGetItemLocalPos();

            switch (f_current_pivot)
            {
            case FBPivot.LeftTop:
                f_current_tip = f_tips[0];
                break;

            case FBPivot.RightTop:
                f_current_tip = f_tips[1];
                break;

            case FBPivot.LeftBottom:
                f_current_tip = f_tips[2];
                break;

            case FBPivot.RightBottom:
                f_current_tip = f_tips[3];
                break;
            }

            f_current_tip.FBOnShow(type, localPos, des, spriteName, tex);
            f_isshow_b = true;
        }
Beispiel #2
0
        public void FBOnShow(FBToolType type, Vector3 pos, string des, string spriteName = null, Texture2D tex = null)
        {
            transform.localPosition = pos;
            f_des_str = des;
            switch (type)
            {
            case FBToolType.Des:
                FBOnSetLabel(false);
                break;

            case FBToolType.Des_Sprite:
                FBOnSetDesSprite(spriteName);
                break;

            case FBToolType.Des_Texture:
                FBOnSetDesTexture(tex);
                break;

            default:
                break;
            }

            gameObject.SetActive(true);
        }