// Token: 0x06002147 RID: 8519 RVA: 0x003F59BC File Offset: 0x003F3BBC private UI_AlliWarSchedule.AWS_LineData InitLine(UI_AlliWarSchedule.AWS_LineData[] container, int index, UI_AlliWarSchedule.AWS_NodeData[] childnodes, byte fightDataIndex, UI_AlliWarSchedule.AWS_LineData[] childlines, Transform lineTrans, UI_AlliWarSchedule.EAWSLineStyle style) { UI_AlliWarSchedule.AWS_LineData aws_LineData = new UI_AlliWarSchedule.AWS_LineData(); aws_LineData.Style = style; aws_LineData.Score = lineTrans.GetChild(index).GetChild(1).GetComponent <UIText>(); aws_LineData.Score.font = GUIManager.Instance.GetTTFFont(); aws_LineData.ImgVS = lineTrans.GetChild(index).GetChild(0).GetComponent <Image>(); if (GUIManager.Instance.IsArabic) { aws_LineData.ImgVS.rectTransform.localScale = new Vector3(-aws_LineData.ImgVS.rectTransform.localScale.x, aws_LineData.ImgVS.rectTransform.localScale.y, aws_LineData.ImgVS.rectTransform.localScale.z); } aws_LineData.Line = lineTrans.GetChild(index).GetComponent <Image>(); if (DataManager.Instance.UserLanguage == GameLanguage.GL_Chs) { aws_LineData.ImgVS.sprite = this.AGS_SpriteArray2.GetSprite(1); } aws_LineData.Node1 = childnodes[index * 2]; aws_LineData.Node2 = childnodes[index * 2 + 1]; aws_LineData.ChildLine1 = ((childlines != null) ? childlines[index * 2] : null); aws_LineData.ChildLine2 = ((childlines != null) ? childlines[index * 2 + 1] : null); aws_LineData.FightDataIndex = fightDataIndex; aws_LineData.StrScore = new CString(10); container[index] = aws_LineData; return(aws_LineData); }
// Token: 0x0600214A RID: 8522 RVA: 0x003F5F34 File Offset: 0x003F4134 private void RefreshNode(byte level, int LineIdx, UI_AlliWarSchedule.AWS_NodeData[] nodes, UI_AlliWarSchedule.AWS_LineData[] lines) { int num = LineIdx * 2; int fightDataIndex = (int)lines[LineIdx].FightDataIndex; UI_AlliWarSchedule.AWS_LineData childLine = lines[LineIdx].ChildLine1; UI_AlliWarSchedule.AWS_LineData childLine2 = lines[LineIdx].ChildLine2; UI_AlliWarSchedule.EAWSLineState eawslineState; if (UI_AlliWarSchedule.FightData[fightDataIndex].Winner != 0) { eawslineState = UI_AlliWarSchedule.EAWSLineState.Score; } else if (level > (byte)UI_AlliWarSchedule.Step) { eawslineState = UI_AlliWarSchedule.EAWSLineState.Empty; } else { eawslineState = UI_AlliWarSchedule.EAWSLineState.VS; } bool highlight = false; if (UI_AlliWarSchedule.Step == UI_AlliWarSchedule.EAWSFightStep.Final || (level == 3 && eawslineState == UI_AlliWarSchedule.EAWSLineState.Score)) { highlight = true; } else if ((byte)UI_AlliWarSchedule.Step <= level) { highlight = true; } if (eawslineState == UI_AlliWarSchedule.EAWSLineState.Empty) { if ((childLine != null && (childLine.Node1.State == UI_AlliWarSchedule.EAWSNodeState.UnKnown || childLine.Node1.State == UI_AlliWarSchedule.EAWSNodeState.Empty)) || (childLine2 != null && (childLine2.Node2.State == UI_AlliWarSchedule.EAWSNodeState.UnKnown || childLine2.Node2.State == UI_AlliWarSchedule.EAWSNodeState.Empty))) { this.SetupNode(ref nodes[num], UI_AlliWarSchedule.EAWSNodeState.Empty, highlight, 0); this.SetupNode(ref nodes[num + 1], UI_AlliWarSchedule.EAWSNodeState.Empty, highlight, 0); } else { this.SetupNode(ref nodes[num], UI_AlliWarSchedule.EAWSNodeState.UnKnown, highlight, 0); this.SetupNode(ref nodes[num + 1], UI_AlliWarSchedule.EAWSNodeState.UnKnown, highlight, 0); } } else { if (UI_AlliWarSchedule.AllianceData[(int)UI_AlliWarSchedule.FightData[fightDataIndex].Alliance1Index].ID != 0u) { this.SetupNode(ref nodes[num], UI_AlliWarSchedule.EAWSNodeState.Normal, highlight, (int)UI_AlliWarSchedule.FightData[fightDataIndex].Alliance1Index); } else { this.SetupNode(ref nodes[num], UI_AlliWarSchedule.EAWSNodeState.NoAlliance, highlight, (int)UI_AlliWarSchedule.FightData[fightDataIndex].Alliance1Index); } if (UI_AlliWarSchedule.AllianceData[(int)UI_AlliWarSchedule.FightData[fightDataIndex].Alliance2Index].ID != 0u) { this.SetupNode(ref nodes[num + 1], UI_AlliWarSchedule.EAWSNodeState.Normal, highlight, (int)UI_AlliWarSchedule.FightData[fightDataIndex].Alliance2Index); } else { this.SetupNode(ref nodes[num + 1], UI_AlliWarSchedule.EAWSNodeState.NoAlliance, highlight, (int)UI_AlliWarSchedule.FightData[fightDataIndex].Alliance2Index); } } if (eawslineState == UI_AlliWarSchedule.EAWSLineState.VS && nodes[num].StrNone.enabled && nodes[num + 1].StrNone.enabled) { if ((byte)UI_AlliWarSchedule.Step == level) { eawslineState = UI_AlliWarSchedule.EAWSLineState.EmptyLightLine; } else { eawslineState = UI_AlliWarSchedule.EAWSLineState.Empty; } } this.SetupLine(ref lines[LineIdx], eawslineState, fightDataIndex); }
// Token: 0x06002148 RID: 8520 RVA: 0x003F5B2C File Offset: 0x003F3D2C private void SetupLine(ref UI_AlliWarSchedule.AWS_LineData _node, UI_AlliWarSchedule.EAWSLineState state, int fightDataIndex = 0) { switch (state) { case UI_AlliWarSchedule.EAWSLineState.VS: if (_node.Line.color.a != 0) { _node.Line.color = new Color32(93, 187, 236, byte.MaxValue); } _node.Score.enabled = false; _node.ImgVS.enabled = true; _node.State = UI_AlliWarSchedule.EAWSLineState.VS; return; case UI_AlliWarSchedule.EAWSLineState.Score: if (_node.Line.color.a != 0) { _node.Line.color = new Color32(108, 118, 126, byte.MaxValue); } if (UI_AlliWarSchedule.FightData[fightDataIndex].Score1 != 0 || UI_AlliWarSchedule.FightData[fightDataIndex].Score2 != 0) { _node.StrScore.ClearString(); _node.StrScore.IntToFormat((long)UI_AlliWarSchedule.FightData[fightDataIndex].Score1, 1, false); _node.StrScore.IntToFormat((long)UI_AlliWarSchedule.FightData[fightDataIndex].Score2, 1, false); if (_node.Style == UI_AlliWarSchedule.EAWSLineStyle.Vertical) { _node.StrScore.AppendFormat("{0}\n|\n{1}"); } else if (GUIManager.Instance.IsArabic) { _node.StrScore.AppendFormat("{1}─{0}"); } else { _node.StrScore.AppendFormat("{0}─{1}"); } _node.Score.text = _node.StrScore.ToString(); } else { _node.Score.text = string.Empty; } _node.Score.enabled = true; _node.ImgVS.enabled = false; _node.State = UI_AlliWarSchedule.EAWSLineState.Score; return; case UI_AlliWarSchedule.EAWSLineState.EmptyLightLine: if (_node.Line.color.a != 0) { _node.Line.color = new Color32(93, 187, 236, byte.MaxValue); } _node.Score.enabled = false; _node.ImgVS.enabled = false; _node.State = UI_AlliWarSchedule.EAWSLineState.Empty; return; } if (_node.Line.color.a != 0) { _node.Line.color = new Color32(108, 118, 126, byte.MaxValue); } _node.Score.enabled = false; _node.ImgVS.enabled = false; _node.State = UI_AlliWarSchedule.EAWSLineState.Empty; }