// Token: 0x0600079A RID: 1946 RVA: 0x000A38C4 File Offset: 0x000A1AC4 private Gameplay CreateGameplay(GameplayKind gp) { Gameplay result = null; switch (gp) { case GameplayKind.Origin: result = new Origin(); break; case GameplayKind.Update: result = new UpdateController(this); break; case GameplayKind.Battle: result = new BattleController(); break; case GameplayKind.War: result = new WarManager(); break; case GameplayKind.CHAOS: result = new CHAOS(); break; case GameplayKind.Front: result = new Front(); break; case GameplayKind.Cosmos: result = new Cosmos(); break; } return(result); }
// Token: 0x060027A3 RID: 10147 RVA: 0x0043E280 File Offset: 0x0043C480 public void SetSpecialBox(bool bShow, byte type = 0) { if (bShow) { Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door; if (door == null) { return; } if (door.m_GroundInfo.TileMapMat == null) { door.m_GroundInfo.TileMapMat = (UnityEngine.Object.Instantiate(door.TileMapController.TileSprites.m_Image.material) as Material); door.m_GroundInfo.TileMapMat.renderQueue = 3000; } this.TextBoxTrans.gameObject.SetActive(true); this.TextBoxTrans.sizeDelta = new Vector2(500f, 150f); Vector2 a = GUIManager.Instance.pDVMgr.CanvasRT.sizeDelta * 0.5f; this.TextBoxTrans.anchoredPosition = a + new Vector2(0f, 60f); for (int i = 0; i < 3; i++) { this.m_ImageEx[i].gameObject.SetActive(true); this.m_ImageEx[i].material = door.m_GroundInfo.TileMapMat; } if (type == 0) { door.TileMapController.getTileMapSprite(ref this.m_ImageEx[0], POINT_KIND.PK_CITY, 25, CITY_OUTWARD.CO_PLAYER); this.m_ImageEx[0].SetNativeSize(); this.m_ImageExTrans[0].anchoredPosition = new Vector2(95f, 70f); door.TileMapController.getTileMapSprite(ref this.m_ImageEx[2], POINT_KIND.PK_FOOD, 0, CITY_OUTWARD.CO_PLAYER); this.m_ImageEx[2].SetNativeSize(); this.m_ImageExTrans[2].anchoredPosition = new Vector2(396.5f, 70f); this.m_ImageExTrans[1].anchoredPosition = new Vector2(95f, 60f); Vector3 position = this.m_ImageExTrans[1].position; this.m_ImageExTrans[1].anchoredPosition = new Vector2(396.5f, 60f); Vector3 position2 = this.m_ImageExTrans[1].position; this.m_ImageEx[1].gameObject.SetActive(false); CHAOS chaos = GameManager.ActiveGameplay as CHAOS; if (chaos != null && chaos.realmController != null) { if (this.m_FlowLineFactoryNewbie == null) { this.m_FlowLineFactoryNewbie = new FlowLineFactoryNewbie(chaos.realmController.RealmGroup_3DTransform, chaos.realmController.mapTileController.TileBaseScale); } MapLine mapLine = new MapLine(); mapLine.lineID = uint.MaxValue; mapLine.begin = (ulong)DataManager.Instance.ServerTime; mapLine.during = 5u; mapLine.lineFlag = 0; this.m_FlowLineFactoryNewbie.createLine(mapLine, position, position2, ELineColor.DEEPBLUE, EUnitSide.BLUE, false, true, EMonsterFace.LEFT, 1); } } else if (type == 1) { door.TileMapController.getTileMapSprite(ref this.m_ImageEx[0], POINT_KIND.PK_CITY, 25, CITY_OUTWARD.CO_PLAYER); this.m_ImageEx[0].SetNativeSize(); this.m_ImageExTrans[0].anchoredPosition = new Vector2(95f, 70f); door.TileMapController.getTileMapSprite(ref this.m_ImageEx[2], POINT_KIND.PK_CITY, 24, CITY_OUTWARD.CO_PLAYER); this.m_ImageEx[2].SetNativeSize(); this.m_ImageExTrans[2].anchoredPosition = new Vector2(412.4f, 70f); this.m_ImageExTrans[1].anchoredPosition = new Vector2(95f, 60f); Vector3 position3 = this.m_ImageExTrans[1].position; this.m_ImageExTrans[1].anchoredPosition = new Vector2(412.4f, 60f); Vector3 position4 = this.m_ImageExTrans[1].position; this.m_ImageEx[1].gameObject.SetActive(false); CHAOS chaos2 = GameManager.ActiveGameplay as CHAOS; if (chaos2 != null && chaos2.realmController != null) { if (this.m_FlowLineFactoryNewbie == null) { this.m_FlowLineFactoryNewbie = new FlowLineFactoryNewbie(chaos2.realmController.RealmGroup_3DTransform, chaos2.realmController.mapTileController.TileBaseScale); } MapLine mapLine2 = new MapLine(); mapLine2.lineID = uint.MaxValue; mapLine2.begin = (ulong)DataManager.Instance.ServerTime; mapLine2.during = 2u; mapLine2.lineFlag = 5; this.m_FlowLineFactoryNewbie.createLine(mapLine2, position3, position4, ELineColor.DEEPBLUE, EUnitSide.BLUE, false, true, EMonsterFace.LEFT, 1); this.m_FlowLineFactoryNewbie.MoveUnitToEndPoint(EMarchEventType.EMET_AttackRetreat); } } else if (type == 2) { door.TileMapController.getTileMapSprite(ref this.m_ImageEx[0], POINT_KIND.PK_CITY, 25, CITY_OUTWARD.CO_PLAYER); this.m_ImageEx[0].SetNativeSize(); this.m_ImageExTrans[0].anchoredPosition = new Vector2(95f, 70f); this.m_ImageEx[1].gameObject.SetActive(false); this.m_ImageExTrans[2].anchoredPosition = new Vector2(412.4f, 70f); Vector2 inipos = this.m_ImageExTrans[2].transform.position; float iniscale = 1f / GUIManager.Instance.pDVMgr.CanvasRT.localScale.x; this.Npc_Parent = new GameObject("NPC"); Transform transform = this.Npc_Parent.transform; transform.parent = this.m_ImageExTrans[2].parent; transform.position = Vector3.zero; transform.localScale = Vector3.one; this.Npc_Node = new NPC(inipos, iniscale, 1, 2, NPCState.NPC_Idle, transform, ref this.Npc_ABKey); this.Npc_Node.SetActive(true); this.m_ImageExTrans[2].anchoredPosition = new Vector2(95f, 60f); Vector3 position5 = this.m_ImageEx[2].transform.position; this.m_ImageExTrans[2].anchoredPosition = new Vector2(395f, 60f); Vector3 position6 = this.m_ImageEx[2].transform.position; this.m_ImageEx[2].gameObject.SetActive(false); CHAOS chaos3 = GameManager.ActiveGameplay as CHAOS; if (chaos3 != null && chaos3.realmController != null) { if (this.m_FlowLineFactoryNewbie == null) { this.m_FlowLineFactoryNewbie = new FlowLineFactoryNewbie(chaos3.realmController.RealmGroup_3DTransform, chaos3.realmController.mapTileController.TileBaseScale); } MapLine mapLine3 = new MapLine(); mapLine3.lineID = uint.MaxValue; mapLine3.begin = (ulong)DataManager.Instance.ServerTime; mapLine3.during = 2u; mapLine3.lineFlag = 9; LineNode lineNode = this.m_FlowLineFactoryNewbie.createLine(mapLine3, position5, position6, ELineColor.DEEPBLUE, EUnitSide.BLUE, false, true, EMonsterFace.LEFT, 1); this.m_FlowLineFactoryNewbie.MoveUnitToEndPoint(EMarchEventType.EMET_HitMonsterRetreat); } } } else { for (int j = 0; j < 3; j++) { this.m_ImageEx[j].gameObject.SetActive(false); } if (this.m_FlowLineFactoryNewbie != null) { this.m_FlowLineFactoryNewbie.ClearLine(); } if (this.Npc_Node != null) { this.Npc_Node.Release(); this.Npc_Node = null; AssetManager.UnloadAssetBundle(this.Npc_ABKey, true); } if (this.Npc_Parent != null) { UnityEngine.Object.Destroy(this.Npc_Parent); this.Npc_Parent = null; } } }
// 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); }