private void frmIncarnate_Load(object sender, EventArgs e) { buttonArray[0] = alphaBtn; buttonArray[1] = destinyBtn; buttonArray[2] = hybridBtn; buttonArray[3] = interfaceBtn; buttonArray[4] = judgementBtn; buttonArray[5] = loreBtn; buttonArray[6] = GenesisButton; buttonArray[7] = StanceButton; buttonArray[8] = VitaeButton; buttonArray[9] = OmegaButton; foreach (var button in buttonArray) { button.IA = myParent.Drawing.pImageAttributes; button.ImageOff = MidsContext.Character.IsHero() ? myParent.Drawing.bxPower[2].Bitmap : myParent.Drawing.bxPower[4].Bitmap; button.ImageOn = MidsContext.Character.IsHero() ? myParent.Drawing.bxPower[3].Bitmap : myParent.Drawing.bxPower[5].Bitmap; } BackColor = myParent.BackColor; PopInfo.ForeColor = BackColor; var plLeft = PLLeft; UpdatePLColors(ref plLeft); //LLLeft = llLeft; var plRight = PLRight; UpdatePLColors(ref plRight); //LLRight = llRight; ibClose.IA = myParent.Drawing.pImageAttributes; ibClose.ImageOff = MidsContext.Character.IsHero() ? myParent.Drawing.bxPower[2].Bitmap : myParent.Drawing.bxPower[4].Bitmap; ibClose.ImageOn = MidsContext.Character.IsHero() ? myParent.Drawing.bxPower[3].Bitmap : myParent.Drawing.bxPower[5].Bitmap; var iPopup = new PopUp.PopupData(); var index = iPopup.Add(); iPopup.Sections[index].Add("Click powers to enable/disable them.", PopUp.Colors.Title); iPopup.Sections[index] .Add("Powers in gray (or your custom 'power disabled' color) cannot be included in your stats.", PopUp.Colors.Text, 0.9f); PopInfo.SetPopup(iPopup); ChangedScrollFrameContents(); FillLists(); }
public MapEntity GetMapNodeInfo() { MapEntity mapInfo = new MapEntity(); IList <MapEntity> mapInfoList = new List <MapEntity>(); DataSet ds = _currentDAO.GetMapNodeInfo(); if (ds != null && ds.Tables[0].Rows.Count > 0) { mapInfoList = DataTableToObject.ConvertToList <MapEntity>(ds.Tables[0]); foreach (var map in mapInfoList) { PopInfo popInfo = new PopInfo(); switch (map.NodeTypeId) { case "1": popInfo.type = 1; popInfo.title = "Tips"; popInfo.value = "门店"; break; case "2": popInfo.type = 1; popInfo.title = "Tips"; popInfo.value = "门店"; break; case "3": popInfo.type = 4; popInfo.title = "Tips"; popInfo.value = "http://bs.aladingyidong.com:"; break; default: break; } IList <PopInfo> popListInfo = new List <PopInfo>(); popListInfo.Add(popInfo); map.PopInfo = popListInfo; } } mapInfo.MapList = mapInfoList; return(mapInfo); }
public void showBusyoZukan(GameObject Content) { //Prepare Master & History Entity_busyo_mst tempBusyoMst = Resources.Load("Data/busyo_mst") as Entity_busyo_mst; string zukanBusyoHst = PlayerPrefs.GetString("zukanBusyoHst"); List <string> zukanBusyoHstList = new List <string> (); char[] delimiterChars = { ',' }; if (zukanBusyoHst != null && zukanBusyoHst != "") { if (zukanBusyoHst.Contains(",")) { zukanBusyoHstList = new List <string> (zukanBusyoHst.Split(delimiterChars)); } else { zukanBusyoHstList.Add(zukanBusyoHst); } } //add temporary daimyo busyo int myDaimyo = PlayerPrefs.GetInt("myDaimyo"); Daimyo daimyo = new Daimyo(); int myDaimyoBusyoId = daimyo.getDaimyoBusyoId(myDaimyo); if (!zukanBusyoHstList.Contains(myDaimyoBusyoId.ToString())) { zukanBusyoHstList.Add(myDaimyoBusyoId.ToString()); } //Sort Master by daimyo Entity_busyo_mst busyoMst = new Entity_busyo_mst(); busyoMst.param.AddRange(tempBusyoMst.param); busyoMst.param.Sort((a, b) => a.daimyoId - b.daimyoId); //Show busyo string path = "Prefabs/Zukan/zukanBusyo"; string nameRankPath = "Prefabs/Zukan/NameRank"; int NowQty = 0; int AllQty = 0; for (int i = 0; i < busyoMst.param.Count; i++) { int daimyoId = busyoMst.param[i].daimyoId; if (daimyoId == 0) { daimyoId = busyoMst.param[i].daimyoHst; } if (daimyoId != 0) { AllQty = AllQty + 1; BusyoInfoGet busyoScript = new BusyoInfoGet(); int busyoId = busyoMst.param[i].id; string busyoName = busyoScript.getName(busyoId); string busyoRank = busyoMst.param[i].rank; GameObject back = Instantiate(Resources.Load(path)) as GameObject; back.transform.SetParent(Content.transform); back.transform.localScale = new Vector2(1, 1); back.transform.localPosition = new Vector3(0, 0, 0); GameObject kamon = back.transform.FindChild("kamon").gameObject; //Busyo Icon string busyoPath = "Prefabs/Player/Unit/BusyoUnit"; GameObject busyo = Instantiate(Resources.Load(busyoPath)) as GameObject; busyo.name = busyoId.ToString(); busyo.transform.SetParent(back.transform); busyo.transform.localScale = new Vector2(4, 4); busyo.GetComponent <DragHandler>().enabled = false; foreach (Transform n in busyo.transform) { GameObject.Destroy(n.gameObject); } RectTransform busyoRect = busyo.GetComponent <RectTransform>(); busyoRect.anchoredPosition3D = new Vector3(80, 80, 0); busyoRect.sizeDelta = new Vector2(40, 40); //Kamon string imagePath = "Prefabs/Kamon/MyDaimyoKamon/" + daimyoId.ToString(); kamon.GetComponent <Image> ().sprite = Resources.Load(imagePath, typeof(Sprite)) as Sprite; //Name GameObject nameRank = Instantiate(Resources.Load(nameRankPath)) as GameObject; nameRank.transform.SetParent(back.transform); nameRank.transform.localScale = new Vector2(1, 1); nameRank.transform.localPosition = new Vector3(0, 0, 0); GameObject rank = nameRank.transform.FindChild("Rank").gameObject; rank.GetComponent <Text>().text = busyoRank; //Have or not if (zukanBusyoHstList.Contains(busyoId.ToString())) { NowQty = NowQty + 1; GameObject name = nameRank.transform.FindChild("Name").gameObject; name.GetComponent <Text>().text = busyoName; int hp = busyoMst.param[i].hp; int atk = busyoMst.param[i].atk; int dfc = busyoMst.param[i].dfc; int spd = busyoMst.param[i].spd; string heisyu = busyoMst.param[i].heisyu; int sendpouId = busyoMst.param[i].senpou_id; PopInfo popScript = back.GetComponent <PopInfo>(); popScript.busyoId = busyoId; popScript.busyoName = busyoName; popScript.hp = hp; popScript.atk = atk; popScript.dfc = dfc; popScript.spd = spd; popScript.heisyu = heisyu; popScript.daimyoId = daimyoId; popScript.senpouId = sendpouId; } else { Color noBusyoColor = new Color(0f / 255f, 0f / 255f, 0f / 255f, 255f / 255f); //Black Color backColor = new Color(95f / 255f, 95f / 255f, 95f / 255f, 240f / 255f); //Black Color kamonColor = new Color(105f / 255f, 105f / 255f, 105f / 255f, 135f / 255f); //Black back.GetComponent <Image>().color = backColor; back.GetComponent <Button>().enabled = false; busyo.GetComponent <Image>().color = noBusyoColor; kamon.GetComponent <Image>().color = kamonColor; } } } //Qty float percent = (float)NowQty / (float)AllQty * 100; GameObject.Find("NowQty").GetComponent <Text> ().text = NowQty.ToString(); GameObject.Find("AllQty").GetComponent <Text> ().text = AllQty.ToString() + "(" + percent.ToString("F1") + "%)"; }
private void miniPowerInfo(int pIDX) { if (Locked) { return; } IPower power1 = new Power(myPowers[pIDX]); power1.AbsorbPetEffects(); power1.ApplyGrantPowerEffects(); var iPopup = new PopUp.PopupData(); if (pIDX < 0) { PopInfo.SetPopup(iPopup); ChangedScrollFrameContents(); } else { var index1 = iPopup.Add(); var str1 = ""; switch (power1.PowerType) { case Enums.ePowerType.Click: if (power1.ClickBuff) { str1 = "(Click)"; } break; case Enums.ePowerType.Auto_: str1 = "(Auto)"; break; case Enums.ePowerType.Toggle: str1 = "(Toggle)"; break; } iPopup.Sections[index1].Add(power1.DisplayName, PopUp.Colors.Title); iPopup.Sections[index1].Add(str1 + " " + power1.DescShort, PopUp.Colors.Text, 0.9f); var str2 = power1.DescLong.Replace("<br>", "\r\n"); iPopup.Sections[index1].Add(str1 + " " + str2, PopUp.Colors.Common, 1f, FontStyle.Regular); var index2 = iPopup.Add(); if (power1.EndCost > 0.0) { if (power1.ActivatePeriod > 0.0) { iPopup.Sections[index2].Add("End Cost:", PopUp.Colors.Title, Utilities.FixDP(power1.EndCost / power1.ActivatePeriod) + "/s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } else { iPopup.Sections[index2].Add("End Cost:", PopUp.Colors.Title, Utilities.FixDP(power1.EndCost), PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } } if ((power1.EntitiesAutoHit == Enums.eEntity.None) | ((power1.Range > 20.0) & power1.I9FXPresentP(Enums.eEffectType.Mez, Enums.eMez.Taunt))) { iPopup.Sections[index2].Add("Accuracy:", PopUp.Colors.Title, Utilities.FixDP((float)(MidsContext.Config.BaseAcc * (double)power1.Accuracy * 100.0)) + "%", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power1.RechargeTime > 0.0) { iPopup.Sections[index2].Add("Recharge:", PopUp.Colors.Title, Utilities.FixDP(power1.RechargeTime) + "s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } var durationEffectId = power1.GetDurationEffectID(); var iNum = 0.0f; if (durationEffectId > -1) { iNum = power1.Effects[durationEffectId].Duration; } if ((power1.PowerType != Enums.ePowerType.Toggle) & (power1.PowerType != Enums.ePowerType.Auto_) && iNum > 0.0) { iPopup.Sections[index2].Add("Duration:", PopUp.Colors.Title, Utilities.FixDP(iNum) + "s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power1.Range > 0.0) { iPopup.Sections[index2].Add("Range:", PopUp.Colors.Title, Utilities.FixDP(power1.Range) + "ft", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power1.Arc > 0) { iPopup.Sections[index2].Add("Arc:", PopUp.Colors.Title, Convert.ToString(power1.Arc) + "°", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } else if (power1.Radius > 0.0) { iPopup.Sections[index2].Add("Radius:", PopUp.Colors.Title, Convert.ToString(power1.Radius, CultureInfo.InvariantCulture) + "ft", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } if (power1.CastTime > 0.0) { iPopup.Sections[index2].Add("Cast Time:", PopUp.Colors.Title, Utilities.FixDP(power1.CastTime) + "s", PopUp.Colors.Title, 0.9f, FontStyle.Bold, 1); } var power2 = power1; if (power2.Effects.Length > 0) { iPopup.Sections[index2].Add("Effects:", PopUp.Colors.Title); char[] chArray = { '^' }; var num1 = power2.Effects.Length - 1; for (var index3 = 0; index3 <= num1; ++index3) { if (!(((power2.Effects[index3].EffectType != Enums.eEffectType.GrantPower) | power2.Effects[index3].Absorbed_Effect) & (power2.Effects[index3].EffectType != Enums.eEffectType.RevokePower) & (power2.Effects[index3].EffectType != Enums.eEffectType.SetMode))) { continue; } var index4 = iPopup.Add(); power1.Effects[index3].SetPower(power1); var strArray = power1.Effects[index3].BuildEffectString().Replace("[", "\r\n") .Replace("\r\n", "^").Replace(" ", "").Replace("]", "").Split(chArray); var num2 = strArray.Length - 1; for (var index5 = 0; index5 <= num2; ++index5) { if (index5 == 0) { iPopup.Sections[index4].Add(strArray[index5], PopUp.Colors.Effect, 0.9f, FontStyle.Bold, 1); } else { iPopup.Sections[index4].Add(strArray[index5], PopUp.Colors.Disabled, 0.9f, FontStyle.Italic, 2); } } } } PopInfo.SetPopup(iPopup); ChangedScrollFrameContents(); } }