public void DisplayHuXingFloorScrollMenu() { if (currentSelectHuXingType.allFloor.Length > 1) { List <string> dName = new List <string>(); dName.AddRange(currentSelectHuXingType.GetHuXingAllDisplayName()); List <string> pName = new List <string>(); pName.AddRange(currentSelectHuXingType.GetHuXingAllFloorName()); dName.Reverse(); pName.Reverse(); huXingFloorScrollMenu.CreateItemGroup(dName.ToArray(), pName.ToArray()); huXingFloorScrollMenu.GetComponent <CanveGroupFade>().AlphaPlayForward(); huXingFloorScrollMenu.GetComponent <GameObjectTweenCtrl>().MoveAchorPos(new Vector2(-65, -1075), 0.0f); } }
public void CreateHuXingScrollMenu() { string[] hxNameG = new string[allHuXingTypeFromWeb.Length]; string[] displayNameG = new string[allHuXingTypeFromWeb.Length]; for (int i = 0; i < allHuXingTypeFromWeb.Length; i++) { if (allHuXingTypeFromWeb[i].displayName == "") { allHuXingTypeFromWeb[i].displayName = allHuXingTypeFromWeb[i].hxName; } hxNameG[i] = allHuXingTypeFromWeb[i].hxName; displayNameG[i] = allHuXingTypeFromWeb[i].displayName; } huXingScrollMenu.CreateItemGroup(displayNameG, hxNameG); }
void CreateHXInstanceScrollMenu() { string[] fangJianStringGorup = currentL.GetFangJianHao(currentL.selectHXInstance, int.Parse(buildTextLabel.text), int.Parse(unitTextLabel.text)); string[] fangJianStringGorupDisplay = new string[fangJianStringGorup.Length]; for (int i = 0; i < fangJianStringGorup.Length; i++) { fangJianStringGorupDisplay[i] = "·" + fangJianStringGorup[i].ToString() + "·"; } hxInstanceScrollMenu.scrollRect.content.position = new Vector3(hxInstanceScrollMenu.scrollRect.content.position.x, 0, hxInstanceScrollMenu.scrollRect.content.position.z); hxInstanceScrollMenuBase.DOAnchorPos(new Vector2(0, 0), 0.3f); hxInstanceScrollMenu.CreateItemGroup(fangJianStringGorupDisplay, fangJianStringGorup); if (hxInstanceScrollMenu.GetFirstScrollItem() != null) { hxInstanceScrollMenu.GetFirstScrollItem().GetComponent <ImageButton>().SetBtnState(true, 0); } }
public void OpenChooseUnitMenu() { if (louPanManager != null) { int[] unitIntGorup = louPanManager.GetDistinctUnit(louPanManager.selectHXInstance, int.Parse(buildTextLabel.text)); string[] unitStringGorup = new string[unitIntGorup.Length]; string[] unitStringGorupDisplay = new string[unitIntGorup.Length]; for (int i = 0; i < unitIntGorup.Length; i++) { unitStringGorup[i] = unitIntGorup[i].ToString(); unitStringGorupDisplay[i] = "unit " + unitIntGorup[i].ToString(); } btnChooseUnitBase.transform.DOLocalMoveY(0, 0.3f); unitScrollMenuBase.DOAnchorPos(new Vector2(0, 0), 0.3f); hxInstanceScrollMenuBase.DOAnchorPos(new Vector2(0, -700), 0.3f); unitScrollMenu.CreateItemGroup(unitStringGorupDisplay, unitStringGorup); } }
public void EnterHuXingFloor(CameraUniversalCenter camCenter, string floorName, CanveGroupFade triggerFastMoveSM, ScrollMenu fastMoveSM) { DisplayAllFloorMesh(); currentAtFloor.floorName = ""; foreach (floor f in allFloor) { if (f.floorName == floorName) { currentAtFloor = f; isMYing = true; camCenter.ChangeCamera(f.cameraUniversal, 0.5f); if (f.pointForMove2 != null && f.pointForMove2.Length > 0) { fastMoveSM.GetComponent <RectTransform>().DOAnchorPosY(60, 1); triggerFastMoveSM.AlphaPlayForward(); string[] displayGroup = new string[f.pointForMove2.Length]; string[] paraGroup = new string[f.pointForMove2.Length]; for (int i = 0; i < f.pointForMove2.Length; i++) { displayGroup[i] = f.pointForMove2[i].name; paraGroup[i] = i.ToString(); } fastMoveSM.CreateItemGroup(displayGroup, paraGroup); } else { fastMoveSM.GetComponent <RectTransform>().DOAnchorPosY(60, 1); triggerFastMoveSM.AlphaPlayBackward(); } } } }
public void OpenChooseUnitMenu() { int[] unitIntGorup = currentL.GetDistinctUnit(currentL.selectHXInstance, currentLouID); string[] unitStringGorup = new string[unitIntGorup.Length]; string[] unitStringGorupDisplay = new string[unitIntGorup.Length]; for (int i = 0; i < unitIntGorup.Length; i++) { unitStringGorup[i] = unitIntGorup[i].ToString(); unitStringGorupDisplay[i] = "unit " + unitIntGorup[i].ToString(); if (unitNameDictionary != null && unitNameDictionary.ContainsKey(unitIntGorup[i])) { unitStringGorupDisplay[i] = unitNameDictionary[unitIntGorup[i]]; } } btnChooseUnitBase.transform.DOLocalMoveY(0, 0.3f); unitScrollMenuBase.DOAnchorPos(new Vector2(0, 0), 0.3f); hxInstanceScrollMenuBase.DOAnchorPos(new Vector2(0, -700), 0.3f); unitScrollMenu.CreateItemGroup(unitStringGorupDisplay, unitStringGorup); }
public void OpenChooseBuildingMenu() { if (currentL != null) { btnChooseUnit.CleanState(); int[] louHaoIntGorup = currentL.GetDistinctLouHao(currentL.selectHXInstance); string[] louHaoStringGorup = new string[louHaoIntGorup.Length]; string[] louHaoStringGorupDisplay = new string[louHaoIntGorup.Length]; for (int i = 0; i < louHaoStringGorup.Length; i++) { louHaoStringGorup[i] = louHaoIntGorup[i].ToString(); louHaoStringGorupDisplay[i] = louHaoIntGorup[i].ToString() + " #"; } btnChooseUnitBase.transform.DOLocalMoveY(-700, 0.3f); buildScrollMenuBase.DOAnchorPos(new Vector2(0, 0), 0.3f); hxInstanceScrollMenuBase.DOAnchorPos(new Vector2(0, -700), 0.3f); buildScrollMenu.CreateItemGroup(louHaoStringGorupDisplay, louHaoStringGorup); } }
public void CreateHuXingScrollMenu(SceneInteractiveManger s) { hxfbScene = s.mainSenceInteractiveInfo; //先移除SetImageZoomInAndZoomOutBtnFalse这个方法,再添加.保证只添加了一次 hxfbScene.touchCtrl.hxfbColliderTriggerEvent.RemoveListener(DoubleClickHXFBBox); hxfbScene.touchCtrl.hxfbColliderTriggerEvent.AddListener(DoubleClickHXFBBox); string[] hxNameG = new string[hxSceneHuXingTypeFinal.Length]; string[] displayNameG = new string[hxSceneHuXingTypeFinal.Length]; for (int i = 0; i < hxSceneHuXingTypeFinal.Length; i++) { if (hxSceneHuXingTypeFinal[i].displayName == "") { hxSceneHuXingTypeFinal[i].displayName = hxSceneHuXingTypeFinal[i].hxName; } hxNameG[i] = hxSceneHuXingTypeFinal[i].hxName; displayNameG[i] = hxSceneHuXingTypeFinal[i].displayName; } huXingScrollMenu.CreateItemGroup(displayNameG, hxNameG); }