public MatchesBase(IInternalService internalService, IWebsiteService website, IMatchesTabService matchesTab, GameMode matchGameMode, MatchesTab currentTab) : base(internalService) { Website = website; MatchesTabService = matchesTab; MatchGameMode = matchGameMode; CurrentTab = currentTab; ShowMatchSummaryButtonEnabled = true; SeasonList.Add("Lifetime"); SeasonList.AddRange(HeroesHelpers.Seasons.GetSeasonList()); SelectedSeasonOption = SeasonList[0]; GameTimeList = HeroesHelpers.GameDates.GameTimeList; SelectedGameTimeOption = GameTimeList[0]; GameDateList = HeroesHelpers.GameDates.GameDateList; SelectedGameDateOption = GameDateList[0]; MapsList.Add("Any"); MapsList.AddRange(HeroesIcons.MapBackgrounds().GetMapsList()); SelectedMapOption = MapsList[0]; ReplayBuildsList.Add("Any"); ReplayBuildsList.AddRange(HeroesHelpers.Builds.GetBuildsList(HeroesIcons)); SelectedBuildOption = ReplayBuildsList[0]; HeroesList.Add("Any"); HeroesList.AddRange(HeroesIcons.Heroes().GetListOfHeroes(HeroesIcons.GetLatestHeroesBuild())); SelectedCharacter = HeroesList[0]; Messenger.Default.Register <MatchesDataMessage>(this, (message) => ReceivedMatchSearchData(message)); Messenger.Default.Register <NotificationMessage>(this, async(message) => await ReceivedMessageAsync(message)); }
private IEnumerator LoadTheLevel() { RestrictionManager.allInput = true; Topan.Network.isMessageQueueRunning = false; AudioListener.pause = true; GeneralVariables.lightingFactor = 1f; if (currentPackMap != null) { Destroy(currentPackMap); currentPackMap = null; } AsyncOperation loading = Application.LoadLevelAsync(loadData); if (loadData == "Main Menu") { loaderCam.enabled = false; AudioListener.pause = false; while (!loading.isDone) { yield return(null); } } else { MapsList ml = ((GameObject)Resources.Load("Static Prefabs/MapList")).GetComponent <MapsList>(); Map m = ml.maps[ml.GetIndex(loadData)]; loaderCam.enabled = true; if (m.loaderScreenshot != null) { loaderBackground.enabled = true; loaderBackground.mainTexture = m.loaderScreenshot; } levelTitle.text = m.mapName; levelSubheader.text = m.loaderSubheader.ToUpper(); levelDescription.text = " " + m.loaderDescription; GeneralVariables.lightingFactor = m.lightingMultiplier; } float loadLerp = 0f; while (loadLerp < 0.999f) { loadLerp = Mathf.MoveTowards(loadLerp, loading.progress, Time.deltaTime * 2f); progressBar.value = loadLerp; percentageLabel.text = (loadLerp * 100f).ToString("F0") + "%"; yield return(null); } StartCoroutine(FinishedLoading()); }
public override void OnInspectorGUI() { MapsList ml = (MapsList)target; base.OnInspectorGUI(); GUILayout.Space(10f); if (ml.maps.Length > 0) { EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Remove At", GUILayout.MaxWidth(85f))) { Map[] newMaps = new Map[ml.maps.Length - 1]; int placementIndex = 0; for (int i = 0; i < ml.maps.Length; i++) { if (removeAt == i) { continue; } newMaps[placementIndex] = ml.maps[i]; placementIndex++; } ml.maps = newMaps; } GUILayout.Space(5f); removeAt = EditorGUILayout.IntField("", removeAt, GUILayout.MaxWidth(40f)); removeAt = Mathf.Clamp(removeAt, 0, ml.maps.Length - 1); GUILayout.Space(3f); EditorGUILayout.LabelField("[" + ml.maps[removeAt].mapName + "]"); EditorGUILayout.EndHorizontal(); } if (GUI.changed) { EditorUtility.SetDirty(ml); } }
public MatchesBase(IInternalService internalService, IWebsiteService website, IMatchesTabService matchesTab, GameMode matchGameMode, MatchesTab currentTab) : base(internalService) { Website = website; MatchesTabService = matchesTab; MatchGameMode = matchGameMode; CurrentTab = currentTab; ShowMatchSummaryButtonEnabled = true; SeasonList.AddRange(HeroesHelpers.Seasons.GetSeasonList()); SelectedSeasonOption = SeasonList[0]; GameTimeList = HeroesHelpers.GameDateFilters.GameTimeList; SelectedGameTimeOption = FilterGameTimeOption.Any.GetFriendlyName(); GameDateList = HeroesHelpers.GameDateFilters.GameDateList; SelectedGameDateOption = FilterGameDateOption.Any.GetFriendlyName(); MapsList.Add("Any"); MapsList.AddRange(HeroesIcons.Battlegrounds().Battlegrounds(true).Select(x => x.Name).ToList()); SelectedMapOption = MapsList[0]; ReplayBuildsList.Add("Any"); ReplayBuildsList.AddRange(HeroesIcons.HeroBuilds().Builds); SelectedBuildOption = ReplayBuildsList[0]; HeroesList.Add("Any"); HeroesList.AddRange(HeroesIcons.HeroesData().HeroNames().OrderBy(x => x).ToList()); SelectedCharacter = HeroesList[0]; PartyCountList.Add("Any"); PartyCountList.AddRange(HeroesHelpers.Parties.GetPartyList()); SelectedParty = PartyCountList[0]; SelectedAccountLevel = 0; Messenger.Default.Register <MatchesDataMessage>(this, (message) => ReceivedMatchSearchData(message)); Messenger.Default.Register <NotificationMessage>(this, async(message) => await ReceivedMessageAsync(message)); }
/// <summary> /// 读取字符对照表配置列表 /// </summary> /// <returns>是否读取成功</returns> public static bool ReadConverterMapsList() { _mapsList = new List <ConverterMaps>(); if (!Directory.Exists(ConverterMapsListDirPath)) { return(false); } string[] fileList = null; try { fileList = Directory.GetFiles(ConverterMapsListDirPath, "*" + ConverterMapFileExt); } catch (Exception) { return(false); } if (fileList.Length == 0) { return(false); } foreach (string path in fileList) { try { MapsList.Add(ReadConverterMapsConfig(path)); } catch (Exception) { continue; } } if (MapsList.Count == 0) { return(false); } else { return(true); } }
public void OnGet() { // Query for all possible leagues. IQueryable <string> leaguesQuery = from m in Context.Maps.AsNoTracking() orderby m.League select m.League; // Load related data (Stash <-> Maps <-> Currency) so we can get the seller from Stash-object and price from Currency-object. MapsList = Context.Maps.AsNoTracking() .Include(x => x.Stash) .AsNoTracking() .Include(c => c.Price) .AsNoTracking(); // Filters search to only show maps from selected league. if (!string.IsNullOrEmpty(LeagueString)) { MapsList = MapsList.Where(x => x.League.Equals(LeagueString)).AsNoTracking(); } // Search-function, ignores lowercase / uppercase characters when the search is done (toUpper() might be pretty expensive here). if (!string.IsNullOrEmpty(SearchString)) { MapsList = MapsList.Where(s => s.MapName.ToUpper().Contains(SearchString.ToUpper())).AsNoTracking(); } // Search by seller name. if (!string.IsNullOrEmpty(NameString)) { MapsList = MapsList.Where(n => n.Stash.Seller.Contains(NameString)).AsNoTracking(); } // Orders the list from cheapest map to most expensive map. MapsList = MapsList.OrderBy(c => c.Price.PriceDouble * SetRatio(c.Price.Orb)).AsNoTracking(); // Shows all possible leagues in a selectlist. Leagues = new SelectList(leaguesQuery.Distinct().AsNoTracking().ToList()); MapsDisplayed = MapsList.Take(DefaultAmount).AsNoTracking(); }
static private void Set() { string __airFileName = Path.Combine(Directories.AirClientFolder, _AirGeneratedContent); if (File.Exists(__airFileName)) { _champions = new ChampionsList(); _runes = new RunesList(); _maps = new MapsList(); _featuredGames = new FeaturedGamesList(); _spells = new SpellsList(); _items = new GameItemList(); Tools.Swf.SwfReader __swfReader = new Tools.Swf.SwfReader(__airFileName); __swfReader.DeCompile(); if (__swfReader.CompilationUnit.IsValid) { if (__swfReader.CompilationUnit.Symbols.Count > 0) { foreach (ISwfTag __iSwfTag in __swfReader.CompilationUnit.Tags) { if (__iSwfTag is DoABCTag) { DoABCTag _abctag = (DoABCTag)__iSwfTag; foreach (KeyValuePair <uint, AS3_Class> __class in _abctag.Classes) { if (__class.Value.classname is RTQName) { switch (((RTQName)__class.Value.classname).Name) { case "ChampionGeneratedData": foreach (KeyValuePair <uint, AS3_MethodInfo> __member in __class.Value.traits.methods) { List <object[]> __results = GetParams(__member.Value, "createChampion"); if (__results.Count > 0) { foreach (object[] __result in __results) { _champions.Add(new Champion(__result)); } } } break; case "RuneGeneratedData": foreach (KeyValuePair <uint, AS3_MethodInfo> __member in __class.Value.traits.methods) { List <object[]> __results = GetParams(__member.Value, "createRune"); if (__results.Count > 0) { foreach (object[] __result in __results) { _runes.Add(new Rune(__result)); } } } break; case "MapGeneratedData": foreach (KeyValuePair <uint, AS3_MethodInfo> __member in __class.Value.traits.methods) { List <object[]> __results = GetParams(__member.Value, "createMap"); if (__results.Count > 0) { foreach (object[] __result in __results) { _maps.Add(new Map(__result)); } } } break; case "FeaturedGameGeneratedData": foreach (KeyValuePair <uint, AS3_MethodInfo> __member in __class.Value.traits.methods) { List <object[]> __results = GetParams(__member.Value, "createFeaturedGame"); if (__results.Count > 0) { foreach (object[] __result in __results) { _featuredGames.Add(new FeaturedGame(__result)); } } } break; case "SpellGeneratedData": foreach (KeyValuePair <uint, AS3_MethodInfo> __member in __class.Value.traits.methods) { List <object[]> __results = GetParams(__member.Value, "createSpell"); if (__results.Count > 0) { foreach (object[] __result in __results) { _spells.Add(new Spell(__result)); } } } break; case "GameItemGeneratedData": foreach (KeyValuePair <uint, AS3_MethodInfo> __member in __class.Value.traits.methods) { List <object[]> __results = GetParams(__member.Value, "createGameItem"); if (__results.Count > 0) { foreach (object[] __result in __results) { _items.Add(new GameItem(__result)); } } } break; } } } } } } } } }