Esempio n. 1
0
 protected override void PlayInit()
 {
     if (FUniversalFunction.IsContainSameType(mTag, (int)TweenTag.Tag_Child))
     {
         mChilds = mSprite.gameObject.GetComponentsInChildren <SpriteRenderer>();
     }
 }
Esempio n. 2
0
 protected override void PlayInit()
 {
     if (FUniversalFunction.IsContainSameType(mTag, (int)TweenTag.Tag_Child))
     {
         mChilds = mGraphic.gameObject.GetComponentsInChildren <MaskableGraphic>();
     }
 }
Esempio n. 3
0
        //[nc]表示不关闭任何窗口,[pool]使用池存储界面,[back]界面关闭时回退,[reset]重刷界面
        public BasePlane ShowWindos(string name, params object[] arg)
        {
            List <string> keys = FUniversalFunction.GetChunk(name, "[", "]");

            name = keys[0];
            WinShowType type = WinShowType.WT_Normal;

            if (keys.Contains("nc"))
            {
                type |= WinShowType.WT_NoClose;
            }
            if (keys.Contains("pool"))
            {
                type |= WinShowType.WT_Pool;
            }
            if (keys.Contains("back"))
            {
                type |= WinShowType.WT_Back;
            }
            if (keys.Contains("reset"))
            {
                type |= WinShowType.WT_Reset;
            }
            return(ShowWindos(name, type, arg));
        }
Esempio n. 4
0
        private void Init(GreyType type)
        {
            if (mToos.Count != 0)
            {
                if (type != mGreyType)
                {
                    Clear();
                    mToos.Clear();
                }
            }

            if (mToos.Count == 0)
            {
                mGreyType = type;
                bool IsSpr = FUniversalFunction.IsContainSameType((int)type, (int)GreyType.GT_Sprite);
                if (IsSpr)
                {
                    SpriteRenderer[] sprs = this.gameObject.GetComponentsInChildren <SpriteRenderer>(true);
                    for (int i = 0; i < sprs.Length; i++)
                    {
                        SpriteGrey gr = new SpriteGrey(sprs[i]);
                        mToos.Add(gr);
                    }
                }
                else
                {
                    MaskableGraphic[] maskGraps = this.gameObject.GetComponentsInChildren <MaskableGraphic>(true);
                    for (int i = 0; i < maskGraps.Length; i++)
                    {
                        UIGrey gr = new UIGrey(maskGraps[i]);
                        mToos.Add(gr);
                    }

                    bool GreyButton = FUniversalFunction.IsContainSameType((int)type, (int)GreyType.GT_ForbidButton);
                    if (GreyButton)
                    {
                        Button[] buttons = this.gameObject.GetComponentsInChildren <Button>(true);
                        for (int i = 0; i < buttons.Length; i++)
                        {
                            ButtonGrey gr = new ButtonGrey(buttons[i]);
                            mToos.Add(gr);
                        }
                    }
                }
            }
        }
Esempio n. 5
0
 private void _ReadPack(BytesPack pack)
 {
     mIsBinary  = pack.PopBool("");
     mIsEncrypt = pack.PopBool("");
     while (!pack.IsOver())
     {
         string    fileName = pack.PopString("");
         BytesPack pb       = new BytesPack();
         byte[]    bytes    = pack.PopBytes();
         if (mIsEncrypt)
         {
             FUniversalFunction.EncryptBytes(bytes, 0);
         }
         pb.CreateReadBytes(bytes);
         mDataPacks[fileName] = pb;
     }
 }
Esempio n. 6
0
 public static BasePlane ShowWait(int lay, bool mask = true)
 {
     mMaskWait = FUniversalFunction.SetMaskCode(mMaskWait, 1 << lay, mask);
     if (mask)
     {
         if (mMaskWait != 0 && mWaitPlane == null)
         {
             mWaitPlane = FEngineManager.ShowWindos(ResConfig.CC_WAITPLANE);
         }
     }
     else
     {
         if (mMaskWait == 0 && mWaitPlane != null)
         {
             FEngineManager.CloseWindos(mWaitPlane);
         }
     }
     return(mWaitPlane);
 }
Esempio n. 7
0
        private BasePlane CreateTips(TipsParams param)
        {
            var code = 1 << param.GetLay();

            if (FUniversalFunction.IsContainSameType(mMaskCode, code))
            {
                Queue <TipsParams> qTips = null;
                if (!mDelayData.TryGetValue(code, out qTips))
                {
                    qTips            = new Queue <TipsParams>();
                    mDelayData[code] = qTips;
                }
                qTips.Enqueue(param);
            }
            else
            {
                return(FEngineManager.ShowWindos(param.GetTipsPlane(), WinShowType.WT_Normal, param));
            }
            return(null);
        }
Esempio n. 8
0
        public static void ChangeGreyR(this GameObject go, bool isChange = true, GreyItem.GreyType type = FCGreyItem.GreyType.GT_ForbidButton)
        {
            GreyItem gi = SceneManager.instance.AddComponent <GreyItem>(go);

            if (isChange)
            {
                if (FUniversalFunction.IsContainSameType((int)type, (int)GreyItem.GreyType.GT_Sprite))
                {
                    gi.PlayGray(SceneManager.LoadPrefab <Material>(ResConfig.MATERIAL_GREY + "S"), type);
                }
                else
                {
                    gi.PlayGray(SceneManager.LoadPrefab <Material>(ResConfig.MATERIAL_GREY), type);
                }
            }
            else
            {
                gi.Clear();
            }
        }
Esempio n. 9
0
        public void SetMaskCode(int lay, bool mask = true)
        {
            int code = 1 << lay;

            mMaskCode = FUniversalFunction.SetMaskCode(mMaskCode, code, mask);
            if (!mask)
            {
                if (code != 0)
                {
                    Queue <TipsParams> qTips = null;
                    if (mDelayData.TryGetValue(code, out qTips))
                    {
                        _CreateQueueTips(qTips);
                    }
                }
                else
                {
                    foreach (var k in mDelayData)
                    {
                        _CreateQueueTips(k.Value);
                    }
                }
            }
        }