void AddProperties() { // Debug.Log(DataController.instance.allDataEnemy[index].enemyData.Count); damage1 = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].dmg1; damage2 = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].dmg2; damage3 = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].dmg3; bulletspeed1 = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].bulletspeed1; bulletspeed2 = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].bulletspeed2pixels; bulletspeed3 = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].bulletspeed3; maxtimeDelayAttack1 = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].atksecond1; maxtimeDelayAttack2 = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].atksecond2; maxtimeDelayAttack3 = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].atksecond3; attackrank = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].atkrange; bulletimeexist = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].bulletexisttime; health = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].hp; speed = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].movespeed; exp = (float)DataController.instance.allDataEnemy[index].enemyData[levelBase - 1].exp; if (isBoss || isMiniBoss) { typeItemDrop = TypeItemDrop.none; CalculateBenginHealthBoss(); } }
private void UpdateThingInc(string timestr, List <string> thinglist) { if (AppVars.Profile.ShowTrayBaloons) { var sbline = new StringBuilder(); foreach (var thing in thinglist) { if (sbline.Length > 0) { sbline.Append(", "); } sbline.Append(thing); } UpdateTrayBaloon(sbline.ToString()); } foreach (var thing in thinglist) { var str = string.Format("{0} {1}", timestr, thing); var sp = AppVars.Profile.Stat.Drop.Split('|'); int i; for (i = 0; i < sp.Length; i++) { if (str.Equals(sp[i], StringComparison.OrdinalIgnoreCase)) { break; } } if (i != sp.Length) { continue; } if (thing.EndsWith("NV", StringComparison.OrdinalIgnoreCase)) { int nvinc; if (int.TryParse(thing.Substring(0, thing.Length - 3), out nvinc)) { Interlocked.Add(ref AppVars.Profile.Stat.NV, nvinc); UpdateNV(); } } else { var sb = new StringBuilder(AppVars.Profile.Stat.Drop); if (sb.Length > 0) { sb.Append('|'); } sb.Append(str); AppVars.Profile.Stat.Drop = sb.ToString(); var item = new TypeItemDrop { Name = thing, Count = 1 }; var added = false; var index = 0; while (index < AppVars.Profile.Stat.ItemDrop.Count) { var result = String.Compare(thing, AppVars.Profile.Stat.ItemDrop[index].Name, StringComparison.Ordinal); if (result == 0) { AppVars.Profile.Stat.ItemDrop[index].Count++; added = true; break; } if (result < 0) { AppVars.Profile.Stat.ItemDrop.Insert(index, item); added = true; break; } index++; } if (!added) { AppVars.Profile.Stat.ItemDrop.Add(item); } } } }