// Token: 0x06000AB7 RID: 2743 RVA: 0x000E5E9C File Offset: 0x000E409C public FlowLineFactoryNewbie(Transform realmGroup, float tileBaseScale) { this.CanvasRectTranScale = DataManager.MapDataController.ScreenSpaceCameraCanvasrectranScale; this.m_Parent = new GameObject("FlowLineList_Newbie"); if (realmGroup != null) { this.m_Parent.transform.SetParent(realmGroup); this.m_Parent.transform.localPosition = Vector3.zero; this.m_ParentScaleBase = 1f; } this.ScaleRate = tileBaseScale; SheetAnimationUnitGroupNewbie.InitResource(); }
// Token: 0x06000ABD RID: 2749 RVA: 0x000E6AC4 File Offset: 0x000E4CC4 public void Clear() { this.ClearLine(); if (this.m_Parent) { UnityEngine.Object.Destroy(this.m_Parent); } SheetAnimationUnitGroupNewbie.FreeResource(); if (this.m_Bundle) { this.m_Bundle.Unload(true); } }
// Token: 0x06000AC8 RID: 2760 RVA: 0x000E7188 File Offset: 0x000E5388 public override void setupAnimUnit(byte Side, byte lineFlag, float angle, byte setupFlag = 0) { this.Count = 0; byte b = 0; bool flag = SheetAnimationUnitGroupNewbie.getSpriteDirFromAngle(angle, out b); ushort inKey = 0; switch (lineFlag) { case 5: case 6: case 10: case 11: case 14: case 15: case 17: case 20: inKey = 5; break; case 7: inKey = 4; break; case 8: case 18: inKey = 8; break; case 9: case 19: inKey = 9; Side = 0; break; case 12: inKey = 7; break; case 13: inKey = 1; break; case 16: inKey = 3; break; case 21: inKey = 2; break; case 22: inKey = 10; Side = 0; break; case 23: case 26: inKey = 6; flag = false; b = 0; break; case 24: case 25: inKey = 6; flag = false; b = 0; break; case 27: inKey = 11; flag = false; b = 0; Side = 0; break; } if ((setupFlag & 1) != 0) { flag = true; } MarchPaltform recordByKey = DataManager.Instance.MarchPaltformTable.GetRecordByKey(inKey); int num = 0; int num2 = 0; if (b == 0) { num = (int)recordByKey.UpStartID; num2 = (int)recordByKey.UpEndID; } else if (b == 1) { num = (int)recordByKey.UpRightStartID; num2 = (int)recordByKey.UpRightEndID; } else if (b == 2) { num = (int)recordByKey.RightStartID; num2 = (int)recordByKey.RightEndID; } else if (b == 3) { num = (int)recordByKey.DownRightStartID; num2 = (int)recordByKey.DownRightEndID; } else if (b == 4) { num = (int)recordByKey.DownStartID; num2 = (int)recordByKey.DownEndID; } int num3 = num2 - num; for (int i = 0; i <= num3; i++) { MarchOffset recordByKey2 = DataManager.Instance.MarchOffsetTable.GetRecordByKey((ushort)(num + i)); float x = (float)recordByKey2.OffsetX * 0.001f * (float)((recordByKey2.SignedX != 0) ? -1 : 1) * (float)((!flag) ? 1 : -1); float y = (float)recordByKey2.OffsetY * 0.001f * (float)((recordByKey2.SignedY != 0) ? -1 : 1); bool flag2 = flag; if (GUIManager.Instance.IsArabic) { flag2 = !flag2; if (lineFlag == 0) { flag2 = !flag2; } } this.addAnimUnit(Side, recordByKey2.Kind, b, flag2, new Vector3(x, y, 0f), i, false); } }
// Token: 0x06000ABA RID: 2746 RVA: 0x000E6004 File Offset: 0x000E4204 public LineNode createLine(MapLine mapLine, Vector3 from, Vector3 to, ELineColor color, EUnitSide unitSide, bool bEase = true, bool NeedRenderLine = true, EMonsterFace MonsterFace = EMonsterFace.LEFT, byte bLoop = 0) { CHAOS chaos = GameManager.ActiveGameplay as CHAOS; if (chaos == null || chaos.realmController == null || chaos.realmController.mapLineController == null) { return(null); } if (chaos.realmController.mapLineController.m_Bundle == null) { chaos.realmController.mapLineController.m_Bundle = AssetManager.GetAssetBundle("Role/FlowLinePrefab", 0L); } uint num = mapLine.during; long begin = (long)mapLine.begin; if (num <= 0u) { return(null); } int num2 = (int)(begin + (long)((ulong)num) - DataManager.Instance.ServerTime); if (num2 <= 0) { return(null); } byte side = (byte)unitSide; from = this.m_Parent.transform.InverseTransformPoint(from); from.z = 0f; to = this.m_Parent.transform.InverseTransformPoint(to); to.z = 0f; long num3 = DataManager.Instance.ServerTime - begin; num3 = Math.Max(num3, 0L); num3 = Math.Min(num3, (long)((ulong)num)); float num4 = (float)num3; float num5 = Vector3.Distance(from, to); float num6 = num5 / num * 2f; EMarchEventType emarchEventType = EMarchEventType.EMET_Camp; byte b = mapLine.lineFlag; if (b >= 23) { if (num4 >= 5f) { emarchEventType = (EMarchEventType)b; b = (byte)this.RetreatToReturn((EMarchEventType)b); } else if (b == 24 || b == 25) { side = ((color != ELineColor.DEEPBLUE) ? 0 : 1); } } LineNode lineNode = null; GameObject gameObject; if (this.workingLine != null) { gameObject = this.workingLine.gameObject; gameObject.SetActive(true); this.setupLineNode(lineNode, num5, bEase, (byte)color); } else { if (this.m_Bundle == null) { this.m_Bundle = chaos.realmController.mapLineController.m_Bundle; } gameObject = (UnityEngine.Object.Instantiate(this.m_Bundle.mainAsset) as GameObject); gameObject.transform.parent = this.m_Parent.transform; MeshFilter component = gameObject.GetComponent <MeshFilter>(); Mesh mesh = new Mesh(); MeshRenderer component2 = gameObject.GetComponent <MeshRenderer>(); component2.material.renderQueue = 3001; component.mesh = mesh; lineNode = new LineNode(); lineNode.gameObject = gameObject; lineNode.lineTransform = gameObject.transform; GameObject gameObject2 = new GameObject("movingNode"); gameObject2.transform.parent = gameObject.transform; gameObject2.transform.Rotate(0f, 90f, 0f); lineNode.movingNode = gameObject2.transform; lineNode.meshFilter = component; lineNode.renderer = component2; this.setupLineNode(lineNode, num5, bEase, (byte)color); this.workingLine = lineNode; } float num7 = num4; if (b >= 23 || emarchEventType >= EMarchEventType.EMET_AttackRetreat) { num -= 5u; num7 -= 5f; num7 = ((num7 >= 0f) ? num7 : 0f); } lineNode.lineTableID = (int)mapLine.lineID; lineNode.timeOffset = num7; lineNode.inverseMaxTime = ((num <= 0u) ? 0f : (1f / num)); float x = num5 * (lineNode.timeOffset * lineNode.inverseMaxTime) - num5 * 0.5f; lineNode.movingNode.localPosition = new Vector3(x, 0f, 0f); lineNode.speedRate = num6 / 1.75f; lineNode.unitSpeedRate = 1f; lineNode.bFocus = bLoop; Vector3 from2 = to - from; float num8 = Vector3.Angle(from2, Vector3.right); if (from2.y < 0f) { num8 = 360f - num8; } gameObject.transform.rotation = Quaternion.identity; gameObject.transform.localPosition = from + (to - from) * 0.5f; gameObject.transform.rotation = Quaternion.AngleAxis(num8, Vector3.forward); gameObject.transform.localScale = Vector3.one; this.recalculateSpeed(lineNode, mapLine, true); if (lineNode != null && lineNode.movingNode != null) { if (lineNode.sheetUnit == null) { lineNode.sheetUnit = new SheetAnimationUnitGroupNewbie(); } SheetAnimationUnitGroupNewbie sheetAnimationUnitGroupNewbie = lineNode.sheetUnit as SheetAnimationUnitGroupNewbie; sheetAnimationUnitGroupNewbie.transform.parent = null; sheetAnimationUnitGroupNewbie.transform.rotation = Quaternion.identity; sheetAnimationUnitGroupNewbie.transform.parent = lineNode.movingNode; sheetAnimationUnitGroupNewbie.transform.localPosition = Vector3.zero; byte b2 = 0; if (b == 27 && MonsterFace == EMonsterFace.RIGHT) { b2 |= 1; } sheetAnimationUnitGroupNewbie.setupAnimUnit(side, b, num8, b2); sheetAnimationUnitGroupNewbie.resetScale(); lineNode.flag = b; lineNode.angle = num8; lineNode.side = side; lineNode.MonsterFace = MonsterFace; if (b >= 23) { float timer = 5f - num4; lineNode.renderer.enabled = false; lineNode.action = ELineAction.ACTION_BEFORE; lineNode.timer = timer; } } if (lineNode != null && !NeedRenderLine) { if (lineNode.action == ELineAction.ACTION_BEFORE) { lineNode.action = ELineAction.ACTION_BEFORE_WITHOUT_LINE; } lineNode.renderer.enabled = false; } return(lineNode); }