protected override void PlayInit() { if (FUniversalFunction.IsContainSameType(mTag, (int)TweenTag.Tag_Child)) { mChilds = mGraphic.gameObject.GetComponentsInChildren <MaskableGraphic>(); } }
protected override void PlayInit() { if (FUniversalFunction.IsContainSameType(mTag, (int)TweenTag.Tag_Child)) { mChilds = mSprite.gameObject.GetComponentsInChildren <SpriteRenderer>(); } }
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); } } } } }
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); }
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(); } }