/// <summary> /// /// </summary> public void AlarmNumChange() { if (grid.transform.childCount <= 5) { AlarmNum = AlarmNum - 1; IsExitAlarmTitle = true; if (AlarmNum == 0) { ExitAlarmNumTween(); } else if (AlarmNum > 0) { TitleObj.transform.GetChild(0).GetChild(0).GetComponent <Text>().text = "<color=#58A2B4FF>还有</color>" + AlarmNum.ToString() + "<color=#58A2B4FF>条未处理告警未显示</color>"; isPushInfo = false; } } }
public void SetCameraAlarmNumber(AlarmPushInfo alarm) { if (grid.transform.childCount > 5) { ShowTitleObj(); AlarmNum = AlarmNum + 1; TitleObj.transform.GetChild(0).GetChild(0).GetComponent <Text>().text = "<color=#58A2B4FF>还有</color>" + AlarmNum.ToString() + "<color=#58A2B4FF>条未处理告警未显示</color>"; if (IsTitle) { grid.transform.GetChild(0).DOScaleX(0, 0.3f).OnComplete(() => { DestroyImmediate(grid.transform.GetChild(0).gameObject); ChildMoveTween(); }); } else { TitleObj.GetComponent <RectTransform>().DOAnchorPos3D(new Vector3(-118, 197, 0), 0.1f).OnComplete(() => { TitleObj.transform.GetChild(0).GetComponent <Image>().DOFillAmount(1, 0.1f).OnComplete(() => { IsTitle = true; grid.transform.GetChild(0).DOScaleX(0, 0.3f).OnComplete(() => { DestroyImmediate(grid.transform.GetChild(0).gameObject); ChildMoveTween(); }); }); }); } } else { ChildMoveTween(); } ShowAlarmPushInfoList.Add(alarm); }