public WordCountGoal(int numberOfWords, int wordLength, TimeSpan goalStartTime) { this.goalStartTime = goalStartTime; gameString = GameStrings.GoalCount; Reset(numberOfWords, wordLength); goalTitle = new StringBuilder(); is1337 = false; }
public WordScoreGoal(int score, int count, TimeSpan goalStartTime) { this.score = score; goalTotalNumberOfWords = count; gameString = GameStrings.GoalPoints; this.goalStartTime = goalStartTime; Reset(); }
protected override void OnOver(PegUIElement.InteractionState oldState) { base.OnOver(oldState); if (this.IsAvailable()) { this.m_highlight.ChangeState(ActorStateType.HIGHLIGHT_SECONDARY_ACTIVE); if (!string.IsNullOrEmpty(this.m_mouseOverSound)) { SoundManager.Get().LoadAndPlay(FileUtils.GameAssetPathToName(this.m_mouseOverSound)); } } else if (this.m_unavailableTooltip != null) { SceneUtils.SetLayer(this.m_unavailableTooltip.ShowTooltip(GameStrings.Get("GLUE_STORE_ADVENTURE_BUTTON_UNAVAILABLE_HEADLINE"), GameStrings.Get("GLUE_STORE_ADVENTURE_BUTTON_UNAVAILABLE_DESCRIPTION"), this.m_unavailableTooltipScale, true), this.m_unavailableTooltipLayer); } }
private void ClearPreviousSceneAssets() { foreach (GameStringCategory category in this.m_stringCategoriesToUnload) { GameStrings.UnloadCategory(category); } this.m_stringCategoriesToUnload.Clear(); object[] args = new object[] { this.m_assetLoadStartTimestamp, this.m_assetLoadEndTimestamp }; Log.LoadingScreen.Print("LoadingScreen.ClearPreviousSceneAssets() - START m_assetLoadStartTimestamp={0} m_assetLoadEndTimestamp={1}", args); this.ClearAssets(this.m_assetLoadStartTimestamp, this.m_assetLoadEndTimestamp); this.m_assetLoadStartTimestamp = this.m_assetLoadNextStartTimestamp; this.m_assetLoadEndTimestamp = 0L; this.m_assetLoadNextStartTimestamp = 0L; object[] objArray2 = new object[] { this.m_assetLoadStartTimestamp, this.m_assetLoadEndTimestamp }; Log.LoadingScreen.Print("LoadingScreen.ClearPreviousSceneAssets() - END m_assetLoadStartTimestamp={0} m_assetLoadEndTimestamp={1}", objArray2); }
public void Init(SeasonEndInfo info) { this.m_seasonEndInfo = info; this.m_header.Text = this.GetSeasonName(info.m_seasonID); if ((info.m_rankedRewards != null) && (info.m_rankedRewards.Count > 0)) { this.m_earnedRewardChest = true; } else { this.m_earnedRewardChest = false; } this.m_medal.SetMedal(new MedalInfoTranslator(info.m_rank, info.m_legendIndex), false); this.m_rankName.Text = this.m_medal.GetMedal().name; this.m_bonusStars = info.m_bonusStars; string rankPercentile = GetRankPercentile(this.m_seasonEndInfo.m_rank); if (rankPercentile.Length > 0) { this.m_rankPercentile.gameObject.SetActive(true); object[] args = new object[] { rankPercentile }; this.m_rankPercentile.Text = GameStrings.Format("GLOBAL_SEASON_END_PERCENTILE_LABEL", args); } else { this.m_rankPercentile.gameObject.SetActive(false); } foreach (PegUIElement element in this.m_rewardChests) { element.gameObject.SetActive(false); } int chestIndexFromRank = RankedRewardChest.GetChestIndexFromRank(this.m_seasonEndInfo.m_chestRank); if (chestIndexFromRank >= 0) { this.m_rewardChest = this.m_rewardChests[chestIndexFromRank]; this.m_rewardChest.gameObject.SetActive(true); this.m_medalPlayMaker.FsmVariables.GetFsmGameObject("RankChest").Value = this.m_rewardChest.gameObject; UberText[] componentsInChildren = this.m_rewardChest.GetComponentsInChildren <UberText>(true); if (componentsInChildren.Length > 0) { componentsInChildren[0].Text = info.m_chestRank.ToString(); } this.m_rewardChestHeader.Text = RankedRewardChest.GetChestEarnedFromRank(this.m_seasonEndInfo.m_chestRank); } this.m_rewardChest.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.ChestButtonReleased)); }
private void Start() { this.m_tavernBrawlTray.ToggleTraySlider(true, null, false); Enum[] status = PresenceMgr.Get().GetStatus(); if (((status == null) || (status.Length <= 0)) || (((PresenceStatus)status[0]) != PresenceStatus.TAVERN_BRAWL_FRIENDLY_WAITING)) { Enum[] args = new Enum[] { PresenceStatus.TAVERN_BRAWL_SCREEN }; PresenceMgr.Get().SetStatus(args); } this.RefreshStateBasedUI(false); this.RefreshDataBasedUI(this.m_wipeAnimStartDelay); MusicManager.Get().StartPlaylist(MusicPlaylistType.UI_TavernBrawl); if (TavernBrawlManager.Get().CurrentMission() != null) { int @int = Options.Get().GetInt(Option.LATEST_SEEN_TAVERNBRAWL_SEASON_CHALKBOARD); if (@int == 0) { this.m_doWipeAnimation = true; if (!NotificationManager.Get().HasSoundPlayedThisSession("VO_INNKEEPER_TAVERNBRAWL_WELCOME1_27")) { NotificationManager.Get().CreateInnkeeperQuote(GameStrings.Get("VO_INNKEEPER_TAVERNBRAWL_WELCOME1_27"), "VO_INNKEEPER_TAVERNBRAWL_WELCOME1_27", 0f, null); NotificationManager.Get().ForceAddSoundToPlayedList("VO_INNKEEPER_TAVERNBRAWL_WELCOME1_27"); } } else if (@int < TavernBrawlManager.Get().CurrentMission().seasonId) { this.m_doWipeAnimation = true; int val = Options.Get().GetInt(Option.TIMES_SEEN_TAVERNBRAWL_CRAZY_RULES_QUOTE); if (!NotificationManager.Get().HasSoundPlayedThisSession("VO_INNKEEPER_TAVERNBRAWL_DESC2_30") && (val < 3)) { NotificationManager.Get().CreateInnkeeperQuote(GameStrings.Get("VO_INNKEEPER_TAVERNBRAWL_DESC2_30"), "VO_INNKEEPER_TAVERNBRAWL_DESC2_30", 0f, null); NotificationManager.Get().ForceAddSoundToPlayedList("VO_INNKEEPER_TAVERNBRAWL_DESC2_30"); val++; Options.Get().SetInt(Option.TIMES_SEEN_TAVERNBRAWL_CRAZY_RULES_QUOTE, val); } } if (@int != TavernBrawlManager.Get().CurrentMission().seasonId) { Options.Get().SetInt(Option.LATEST_SEEN_TAVERNBRAWL_SEASON_CHALKBOARD, TavernBrawlManager.Get().CurrentMission().seasonId); } } if (TavernBrawlManager.Get().RewardProgress() == 0) { this.m_rewardHighlight.ChangeState(ActorStateType.HIGHLIGHT_PRIMARY_ACTIVE); } base.StartCoroutine(this.UpdateQuestsWhenReady()); }
private void AllDone() { Vector3 zero = Vector3.zero; for (int i = 0; i < this.m_RewardPackages.Count; i++) { RewardPackageData data = this.m_RewardPackages[i]; zero += data.m_TargetBone.position; } this.m_DoneButton.transform.position = (Vector3)(zero / ((float)this.m_RewardPackages.Count)); this.m_DoneButton.gameObject.SetActive(true); this.m_DoneButton.SetText(GameStrings.Get("GLOBAL_DONE")); Spell component = this.m_DoneButton.m_button.GetComponent <Spell>(); component.AddFinishedCallback(new Spell.FinishedCallback(this.OnDoneButtonShown)); component.ActivateState(SpellStateType.BIRTH); }
public void ChestOver(UIEvent e) { string chestNameFromRank; string str2; if (RankedRewardChest.GetChestIndexFromRank(this.m_rank) >= 0) { chestNameFromRank = RankedRewardChest.GetChestNameFromRank(this.m_rank); str2 = GameStrings.Format("GLUE_QUEST_LOG_CHEST_TOOLTIP_BODY", new object[0]); } else { chestNameFromRank = GameStrings.Format("GLUE_QUEST_LOG_NO_CHEST", new object[0]); str2 = GameStrings.Format("GLUE_QUEST_LOG_CHEST_TOOLTIP_BODY_NO_CHEST", new object[0]); } base.gameObject.GetComponent <TooltipZone>().ShowLayerTooltip(chestNameFromRank, str2); }
private void SetUpBuyWithMoneyButton() { string text = string.Empty; if (this.m_bundle != null) { text = StoreManager.Get().FormatCostBundle(this.m_bundle); this.UpdateMoneyButtonState(); } else { Debug.LogWarning("AdventureStore.SetUpBuyWithMoneyButton(): m_bundle is null"); text = GameStrings.Get("GLUE_STORE_PRODUCT_PRICE_NA"); base.SetMoneyButtonState(Store.BuyButtonState.DISABLED); } base.m_buyWithMoneyButton.SetText(text); }
public static int BindTower(int gridId, int towerUnitId, bool force = false, int eventNameId1 = 0, int eventNameId2 = 0) { var grid = ObjectCache.GetComponent <UBattleGrid>(gridId); if (grid == null) { return(0); } var tower = ObjectCache.GetComponent <UBattleTower>(towerUnitId); if (tower == null) { return(0); } grid.BindTower(tower, force, GameStrings.Get(eventNameId1), GameStrings.Get(eventNameId2)); return(towerUnitId); }
public static string GetElapsedTimeString(ElapsedTimeType timeType, int time, ElapsedStringSet stringSet) { switch (timeType) { case ElapsedTimeType.SECONDS: { object[] args = new object[] { time }; return(GameStrings.Format(stringSet.m_seconds, args)); } case ElapsedTimeType.MINUTES: { object[] objArray2 = new object[] { time }; return(GameStrings.Format(stringSet.m_minutes, objArray2)); } case ElapsedTimeType.HOURS: { object[] objArray3 = new object[] { time }; return(GameStrings.Format(stringSet.m_hours, objArray3)); } case ElapsedTimeType.YESTERDAY: { if (stringSet.m_yesterday != null) { return(GameStrings.Get(stringSet.m_yesterday)); } object[] objArray4 = new object[] { 1 }; return(GameStrings.Format(stringSet.m_days, objArray4)); } case ElapsedTimeType.DAYS: { object[] objArray5 = new object[] { time }; return(GameStrings.Format(stringSet.m_days, objArray5)); } case ElapsedTimeType.WEEKS: { object[] objArray6 = new object[] { time }; return(GameStrings.Format(stringSet.m_weeks, objArray6)); } } return(GameStrings.Get(stringSet.m_monthAgo)); }
public void GotoBonusStars() { this.m_currentMode = MODE.BONUS_STARS; this.m_medalPlayMaker.SendEvent("PageTear"); this.m_rewardChestPage.SetActive(false); this.m_welcomeItems.SetActive(false); this.m_bonusStarItems.SetActive(true); this.m_bonusStarText.Text = this.m_bonusStars.ToString(); GameStrings.PluralNumber[] numberArray1 = new GameStrings.PluralNumber[1]; GameStrings.PluralNumber number = new GameStrings.PluralNumber { m_number = this.m_bonusStars }; numberArray1[0] = number; GameStrings.PluralNumber[] pluralNumbers = numberArray1; this.m_bonusStarLabel.Text = GameStrings.FormatPlurals("GLOBAL_SEASON_END_BONUS_STARS_LABEL", pluralNumbers, new object[0]); this.m_bonusStarTitle.Text = GameStrings.Get("GLOBAL_SEASON_END_BONUS_STAR_TITLE"); }
public static string GetLastOnlineElapsedTimeString(ulong epochMicrosec) { if (epochMicrosec == 0) { return(GameStrings.Get("GLOBAL_OFFLINE")); } TimeUtils.ElapsedStringSet stringSet = new TimeUtils.ElapsedStringSet { m_seconds = "GLOBAL_DATETIME_LASTONLINE_SECONDS", m_minutes = "GLOBAL_DATETIME_LASTONLINE_MINUTES", m_hours = "GLOBAL_DATETIME_LASTONLINE_HOURS", m_yesterday = "GLOBAL_DATETIME_LASTONLINE_DAY", m_days = "GLOBAL_DATETIME_LASTONLINE_DAYS", m_weeks = "GLOBAL_DATETIME_LASTONLINE_WEEKS", m_monthAgo = "GLOBAL_DATETIME_LASTONLINE_MONTH" }; return(TimeUtils.GetElapsedTimeStringFromEpochMicrosec(epochMicrosec, stringSet)); }
private void Awake() { SplashScreen screen = SplashScreen.Get(); if (screen != null) { screen.HideLogo(); } List <FatalErrorMessage> messages = FatalErrorMgr.Get().GetMessages(); Log.JMac.Print(LogLevel.Warning, string.Format("Showing Fatal Error Screen with {0} messages", messages.Count), new object[0]); this.m_closedSignText.Text = messages[0].m_text; this.m_closedSignTitle.Text = GameStrings.Get("GLOBAL_SPLASH_CLOSED_SIGN_TITLE"); this.m_allowClick = messages[0].m_allowClick; this.m_redirectToStore = messages[0].m_redirectToStore; this.m_delayBeforeNextReset = messages[0].m_delayBeforeNextReset; }
private void OnReadyToStartDisenchant() { List <string> postDisenchantInvalidDeckNames = this.GetPostDisenchantInvalidDeckNames(); if (postDisenchantInvalidDeckNames.Count == 0) { EntityDef entityDef = CraftingManager.Get().GetShownActor().GetEntityDef(); string cardId = entityDef.GetCardId(); int num = CraftingManager.Get().GetNumOwnedCopies(cardId, TAG_PREMIUM.GOLDEN, false); int num2 = CraftingManager.Get().GetNumOwnedCopies(cardId, TAG_PREMIUM.NORMAL, true); int num3 = num + num2; if (((CraftingManager.Get().GetNumTransactions() <= 0) && (this.m_lastwarnedCard != cardId)) && ((!entityDef.IsElite() && (num3 <= 2)) || (entityDef.IsElite() && (num3 <= 1)))) { AlertPopup.PopupInfo info = new AlertPopup.PopupInfo { m_headerText = GameStrings.Get("GLUE_CRAFTING_DISENCHANT_CONFIRM_HEADER"), m_text = GameStrings.Get("GLUE_CRAFTING_DISENCHANT_CONFIRM2_DESC"), m_showAlertIcon = true, m_responseDisplay = AlertPopup.ResponseDisplay.CONFIRM_CANCEL, m_responseCallback = new AlertPopup.ResponseCallback(this.OnConfirmDisenchantResponse) }; this.m_lastwarnedCard = cardId; DialogManager.Get().ShowPopup(info); } else { this.DoDisenchant(); } } else { string str2 = GameStrings.Get("GLUE_CRAFTING_DISENCHANT_CONFIRM_DESC"); foreach (string str3 in postDisenchantInvalidDeckNames) { str2 = str2 + "\n" + str3; } AlertPopup.PopupInfo info2 = new AlertPopup.PopupInfo { m_headerText = GameStrings.Get("GLUE_CRAFTING_DISENCHANT_CONFIRM_HEADER"), m_text = str2, m_showAlertIcon = false, m_responseDisplay = AlertPopup.ResponseDisplay.CONFIRM_CANCEL, m_responseCallback = new AlertPopup.ResponseCallback(this.OnConfirmDisenchantResponse) }; DialogManager.Get().ShowPopup(info2); } }
//TODO move to sunset //this gets called after choosing //this also gets called when you die/finish the game //also called when you get to age 110 public void transition_to_TRANSITION_play(CharacterIndex aNextCharacter) { float gDiffDisplayDur = 4f; GS = NormalPlayGameState.TRANSITION; //TODO maybe play a sound "Too Easy" "Ok" "Hard" "That's Impossible!!" var diffPhrases = new string[] { GameStrings.GetString("MNPdiff1"), GameStrings.GetString("MNPdiff2"), GameStrings.GetString("MNPdiff3"), GameStrings.GetString("MNPdiff4") }; TED.add_event( aNextCharacter.LevelIndex < 7 //if not grave or age 110 ? mSunsetManager.low_skippable_text_bubble_event(diffPhrases [NGM.CharacterHelper.Characters [aNextCharacter].Difficulty], gDiffDisplayDur) : delegate(float aTime){ return(true); } ).then_one_shot( delegate() { if (aNextCharacter != CharacterIndex.sGrave) { mManager.mAssetLoader.new_load_character(aNextCharacter.StringIdentifier, mManager.mCharacterBundleManager); } else { //This can probably stay here //we just died, so add the last character we just played and set the sun //normally this will get called right after you make a choice but if we're here that meeans we didn't make a choice because we died mSunsetManager.add_character(NGM.CurrentCharacterLoader.Character, !CurrentPerformanceStat.BadPerformance, false); mSunsetManager.set_sun(); slide_image(mFlatCamera, null, mSunsetImage, false, false); if (NGM.CurrentCharacterIndex == CharacterIndex.sOneHundred) { mSunsetManager.ShowBackground = false; } transition_to_GRAVE(); } } ); }
private void ChoiceButton_OnRelease(UIEvent e) { int friendlyPlayerId = GameState.Get().GetFriendlyPlayerId(); ChoiceState state = this.m_choiceStateMap[friendlyPlayerId]; if (this.m_friendlyChoicesShown) { this.m_choiceButton.SetText(GameStrings.Get("GLOBAL_SHOW")); this.HideChoiceCards(state); this.m_friendlyChoicesShown = false; } else { this.m_choiceButton.SetText(GameStrings.Get("GLOBAL_HIDE")); this.ShowChoiceCards(state, true, this.m_ChoiceEffectData.m_AlwaysPlayChoiceEffects); this.m_friendlyChoicesShown = true; } }
public static int BindTower(int gridId, int prefabNameId, int prefabFolderId, int star, int eventNameId1 = 0, int eventNameId2 = 0) { var grid = ObjectCache.GetComponent <UBattleGrid>(gridId); if (grid == null) { return(0); } var tower = grid.BindTower(prefabNameId, prefabFolderId, GameStrings.Get(eventNameId1), GameStrings.Get(eventNameId2)); if (tower == null) { return(0); } tower.SetLevel(star); tower.unitId = tower.GetInstanceID(); return(tower.unitId); }
public void StarBurstFinished() { if (this.m_medal.GetMedal().rank == 0) { this.m_medalPlayMaker.SendEvent("JustMedalIn"); } else { this.m_medalPlayMaker.SendEvent("MedalBannerIn"); } this.m_bonusStarText.gameObject.SetActive(false); this.m_bonusStarLabel.Text = this.m_medal.GetMedal().name; NetCache.NetCacheRewardProgress netObject = NetCache.Get().GetNetObject <NetCache.NetCacheRewardProgress>(); string inlineSeasonName = this.GetInlineSeasonName(netObject.Season); object[] args = new object[] { inlineSeasonName }; this.m_bonusStarTitle.Text = GameStrings.Format("GLOBAL_SEASON_END_NEW_SEASON", args); }
private void OnButtonOver(UIEvent e) { SoundManager.Get().LoadAndPlay("store_button_mouse_over", base.gameObject); if (this.m_highlightState != null) { this.m_highlightState.ChangeState(ActorStateType.HIGHLIGHT_MOUSE_OVER); } if (this.m_highlight != null) { this.m_highlight.SetActive(true); } TooltipZone component = base.GetComponent <TooltipZone>(); if (component != null) { component.ShowBoxTooltip(GameStrings.Get("GLUE_TOOLTIP_BUTTON_STORE_HEADLINE"), GameStrings.Get("GLUE_TOOLTIP_BUTTON_STORE_DESC")); } }
public bool Show(int maxQuantity, OkayListener delOkay = null, CancelListener delCancel = null) { if (base.m_shown) { return(false); } this.m_currentMaxQuantity = maxQuantity; object[] args = new object[] { maxQuantity }; this.m_messageText.Text = GameStrings.Format("GLUE_STORE_QUANTITY_MESSAGE", args); base.m_shown = true; this.m_currentOkayListener = delOkay; this.m_currentCancelListener = delCancel; this.m_quantityText.Text = string.Empty; base.gameObject.SetActive(true); Debug.Log(string.Concat(new object[] { "show postition2 = ", base.m_showPosition, " ", base.m_showScale })); base.DoShowAnimation(new UIBPopup.OnAnimationComplete(this.ShowInput)); return(true); }
private void SetUpBuyWithGoldButton() { string text = string.Empty; if (this.m_bundle != null) { text = this.m_bundle.GoldCost.ToString(); NetCache.NetCacheGoldBalance netObject = NetCache.Get().GetNetObject <NetCache.NetCacheGoldBalance>(); this.UpdateGoldButtonState(netObject); } else { Debug.LogWarning("AdventureStore.SetUpBuyWithGoldButton(): m_bundle is null"); text = GameStrings.Get("GLUE_STORE_PRODUCT_PRICE_NA"); base.SetMoneyButtonState(Store.BuyButtonState.DISABLED); } base.m_buyWithGoldButton.SetText(text); }
private static List <ComboItem> CreateGen8a(GameStrings s) { var locations = Util.GetCBList(s.metLA_00000, 0); Util.AddCBWithOffset(locations, s.metLA_30000, 30000, Locations.LinkTrade6); Util.AddCBWithOffset(locations, s.metLA_00000, 00000, Locations8a.Met0); Util.AddCBWithOffset(locations, s.metLA_30000, 30000, Locations8a.Met3); Util.AddCBWithOffset(locations, s.metLA_40000, 40000, Locations8a.Met4); Util.AddCBWithOffset(locations, s.metLA_60000, 60000, Locations8a.Met6); // Add in the BDSP+PLA magic met locations. locations.Add(new ComboItem($"{s.EggName} (BD/SP)", Locations.HOME_SWSHBDSPEgg)); locations.Add(new ComboItem(s.gamelist[(int)BD], Locations.HOME_SWBD)); locations.Add(new ComboItem(s.gamelist[(int)SP], Locations.HOME_SHSP)); locations.Add(new ComboItem(s.gamelist[(int)PLA], Locations.HOME_SWLA)); return(locations); }
private void OnChangeLanguageConfirmationResponse(AlertPopup.Response response, object userData) { if (response == AlertPopup.Response.CANCEL) { this.m_languageDropdown.setSelection(this.GetCurrentLanguage()); return; } string localeName = null; string str2 = (string)userData; IEnumerator enumerator = Enum.GetValues(typeof(Locale)).GetEnumerator(); try { while (enumerator.MoveNext()) { Locale current = (Locale)((int)enumerator.Current); if (str2 == GameStrings.Get(this.StringNameFromLocale(current))) { localeName = current.ToString(); goto Label_0095; } } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable == null) { } disposable.Dispose(); } Label_0095: if (localeName == null) { Debug.LogError(string.Format("OptionsMenu.OnChangeLanguageConfirmationResponse() - locale not found", new object[0])); } else { Localization.SetLocaleName(localeName); Options.Get().SetString(Option.LOCALE, localeName); this.Hide(false); ApplicationMgr.Get().Reset(); } }
private void InitGoldRewardUI() { NetCache.NetCacheRewardProgress netObject = NetCache.Get().GetNetObject <NetCache.NetCacheRewardProgress>(); TAG_GOLD_REWARD_STATE tag = GameState.Get().GetFriendlySidePlayer().GetTag <TAG_GOLD_REWARD_STATE>(GAME_TAG.GOLD_REWARD_STATE); if (tag == TAG_GOLD_REWARD_STATE.ELIGIBLE) { NetCache.NetCacheGamesPlayed played = NetCache.Get().GetNetObject <NetCache.NetCacheGamesPlayed>(); Log.Rachelle.Print(string.Format("EndGameTwoScoop.UpdateData(): {0}/{1} wins towards {2} gold", played.FreeRewardProgress, netObject.WinsPerGold, netObject.GoldPerReward), new object[0]); this.m_showWinProgress = true; this.m_gamesWonIndicator.Init(Reward.Type.GOLD, netObject.GoldPerReward, netObject.WinsPerGold, played.FreeRewardProgress, GamesWonIndicator.InnKeeperTrigger.NONE); } else { Log.Rachelle.Print(string.Format("VictoryScreen.InitGoldRewardUI(): goldRewardState = {0}", tag), new object[0]); string str = string.Empty; switch (tag) { case TAG_GOLD_REWARD_STATE.ALREADY_CAPPED: { object[] args = new object[] { netObject.MaxGoldPerDay }; str = GameStrings.Format("GLOBAL_GOLD_REWARD_ALREADY_CAPPED", args); break; } case TAG_GOLD_REWARD_STATE.BAD_RATING: str = GameStrings.Get("GLOBAL_GOLD_REWARD_BAD_RATING"); break; case TAG_GOLD_REWARD_STATE.SHORT_GAME: str = GameStrings.Get("GLOBAL_GOLD_REWARD_SHORT_GAME"); break; case TAG_GOLD_REWARD_STATE.OVER_CAIS: str = GameStrings.Get("GLOBAL_GOLD_REWARD_OVER_CAIS"); break; } if (!string.IsNullOrEmpty(str)) { this.m_showNoGoldRewardText = true; this.m_noGoldRewardText.Text = str; } } }
private DataGridViewRow CreateRaidRow(uint current_frame, RaidPKM res, GameStrings s, ulong current_seed) { var row = new DataGridViewRow(); row.CreateCells(raidContent); row.Cells[0].Value = current_frame.ToString(); row.Cells[1].Value = $"{res.IVs[0]:00}"; row.Cells[2].Value = $"{res.IVs[1]:00}"; row.Cells[3].Value = $"{res.IVs[2]:00}"; row.Cells[4].Value = $"{res.IVs[3]:00}"; row.Cells[5].Value = $"{res.IVs[4]:00}"; row.Cells[6].Value = $"{res.IVs[5]:00}"; row.Cells[7].Value = s.Natures[res.Nature]; row.Cells[8].Value = s.Ability[res.Ability]; row.Cells[9].Value = genders[res.Gender]; row.Cells[10].Value = shinytype[res.ShinyType]; row.Cells[11].Value = $"{current_seed:X16}"; return(row); }
private static void SpectatorCount_OnRollover(UIEvent evt) { BnetBar bar = Get(); if (bar != null) { string str2; string headline = GameStrings.Get("GLOBAL_SPECTATOR_COUNT_PANEL_HEADER"); BnetGameAccountId[] spectatorPartyMembers = SpectatorManager.Get().GetSpectatorPartyMembers(true, false); if (spectatorPartyMembers.Length == 1) { string playerBestName = BnetUtils.GetPlayerBestName(spectatorPartyMembers[0]); object[] args = new object[] { playerBestName }; str2 = GameStrings.Format("GLOBAL_SPECTATOR_COUNT_PANEL_TEXT_ONE", args); } else { if (< > f__am$cache20 == null) {
public void transition_to_ASTRONAUT() { mSunsetManager.add_character(NGM.CurrentCharacterLoader.Character, !CurrentPerformanceStat.BadPerformance); slide_image(mFlatCamera, null, mSunsetImage, false); TED.add_event( delegate(float aTime){ //mSunsetManager.fade_characters(true,true); mSunsetManager.set_sun(); return(true); } , 4).then( mSunsetManager.low_skippable_text_bubble_event(GameStrings.GetString("MNPastro"), 4) , 4).then_one_shot( delegate(){ transition_to_TRANSITION_play(CharacterIndex.sOneHundred); } , 0); }
private void OnInputSubmitted(string input) { string email = !this.m_usePlayer ? input.Trim() : this.m_player.GetBattleTag().ToString(); if (email.Contains("@")) { BnetFriendMgr.Get().SendInviteByEmail(email); } else if (email.Contains("#")) { BnetFriendMgr.Get().SendInviteByBattleTag(email); } else { string message = GameStrings.Get("GLOBAL_ADDFRIEND_ERROR_MALFORMED"); UIStatus.Get().AddError(message); } this.OnClosed(); }
public override void SpecificHandle(IGameState previous, IGameState next) { var cardDef = DefLoader.Get().GetCardDef("EX1_383"); var entDef = DefLoader.Get().GetEntityDef("EX1_383"); var sourcePos = new Vector3(0, 0, 0); if (cardDef == null || entDef == null) { AlertPopup.PopupInfo popupInfo = new AlertPopup.PopupInfo(); popupInfo.m_headerText = GameStrings.Get("Error"); popupInfo.m_text = "Tirion CardDef or EntityDef havent been loaded yet"; popupInfo.m_responseDisplay = AlertPopup.ResponseDisplay.CONFIRM; DialogManager.Get().ShowPopup(popupInfo, null, null); } else { CollectionDeckTray.Get().GetDeckBigCard().Show(entDef, TAG_PREMIUM.GOLDEN, cardDef, sourcePos, GhostCard.Type.NONE); } }
protected override void OnDataSet(bool updateVisuals) { if (updateVisuals) { string headline = GameStrings.Get("GLOBAL_REWARD_CARD_BACK_HEADLINE"); base.SetRewardText(headline, string.Empty, string.Empty); CardBackRewardData data = base.Data as CardBackRewardData; if (data == null) { Debug.LogWarning(string.Format("CardBackReward.OnDataSet() - Data {0} is not CardBackRewardData", base.Data)); } else { base.SetReady(false); CardBackManager.Get().LoadCardBackByIndex(data.CardBackID, new CardBackManager.LoadCardBackData.LoadCardBackCallback(this.OnFrontCardBackLoaded), true, "Card_Hidden"); CardBackManager.Get().LoadCardBackByIndex(data.CardBackID, new CardBackManager.LoadCardBackData.LoadCardBackCallback(this.OnBackCardBackLoaded), true, "Card_Hidden"); } } }
public void ShowDamage(UBattleUnit unit, int damage, int prefabNameId, int prefabFolderId, int boneNameId) { var prefabName = GameStrings.Get(prefabNameId); var prefabFolder = GameStrings.Get(prefabFolderId); var uDamage = damagePool.RequestComponent <UBattleDamage>(prefabName, prefabFolder, true, this.objTopCanvas.transform); if (uDamage == null) { return; } using (zstring.Block()) { uDamage.txtDamage.text = zstring.Format("{0}", damage).Intern(); } var boneName = GameStrings.Get(boneNameId); boneName = string.IsNullOrEmpty(boneName) ? "head" : boneName; uDamage.transform.position = unit.GetBonePosition(boneName); }
public SpecificWordGoal(StringBuilder word, TimeSpan goalStartTime) { this.goalStartTime = goalStartTime; this.word = word; gameString = GameStrings.GoalSpecific; }
private static GameStrings getIndex(int index) { return Languages[index] ?? (Languages[index] = new GameStrings(lang_val[index])); }
public static void setItemDataSource(bool HaX, int MaxItemID, IEnumerable<ushort> allowed, int generation, GameVersion game, GameStrings s) { string[] items = s.getItemStrings(generation, game); ItemDataSource = Util.getCBList(items, (HaX ? Enumerable.Range(0, MaxItemID) : allowed.Select(i => (int) i)).ToArray()); }
public static void InitializeDataSources(GameStrings s) { int[] ball_nums = { 7, 576, 13, 492, 497, 14, 495, 493, 496, 494, 11, 498, 8, 6, 12, 15, 9, 5, 499, 10, 1, 16 }; int[] ball_vals = { 7, 25, 13, 17, 22, 14, 20, 18, 21, 19, 11, 23, 8, 6, 12, 15, 9, 5, 24, 10, 1, 16 }; BallDataSource = Util.getVariedCBList(s.itemlist, ball_nums, ball_vals); SpeciesDataSource = Util.getCBList(s.specieslist, null); NatureDataSource = Util.getCBList(s.natures, null); AbilityDataSource = Util.getCBList(s.abilitylist, null); VersionDataSource = Util.getCBList(s.gamelist, Legal.Games_7sm, Legal.Games_6oras, Legal.Games_6xy, Legal.Games_5, Legal.Games_4, Legal.Games_4e, Legal.Games_4r, Legal.Games_3, Legal.Games_3e, Legal.Games_3r, Legal.Games_3s); MoveDataSource = Util.getCBList(s.movelist, null); #region Met Locations // Gen 2 { var met_list = Util.getCBList(s.metGSC_00000, Enumerable.Range(0, 0x5F).ToArray()); met_list = Util.getOffsetCBList(met_list, s.metGSC_00000, 00000, new[] { 0x7E, 0x7F }); metGen2 = met_list; } // Gen 3 { var met_list = Util.getCBList(s.metRSEFRLG_00000, Enumerable.Range(0, 213).ToArray()); met_list = Util.getOffsetCBList(met_list, s.metRSEFRLG_00000, 00000, new[] { 253, 254, 255 }); metGen3 = met_list; var cxd_list = Util.getCBList(s.metCXD_00000, Enumerable.Range(0, s.metCXD_00000.Length).ToArray()).Where(c => c.Text.Length > 0).ToList(); metGen3CXD = cxd_list; } // Gen 4 { var met_list = Util.getCBList(s.metHGSS_00000, new[] { 0 }); met_list = Util.getOffsetCBList(met_list, s.metHGSS_02000, 2000, new[] { 2000 }); met_list = Util.getOffsetCBList(met_list, s.metHGSS_02000, 2000, new[] { 2002 }); met_list = Util.getOffsetCBList(met_list, s.metHGSS_03000, 3000, new[] { 3001 }); met_list = Util.getOffsetCBList(met_list, s.metHGSS_00000, 0000, Legal.Met_HGSS_0); met_list = Util.getOffsetCBList(met_list, s.metHGSS_02000, 2000, Legal.Met_HGSS_2); met_list = Util.getOffsetCBList(met_list, s.metHGSS_03000, 3000, Legal.Met_HGSS_3); metGen4 = met_list; } // Gen 5 { var met_list = Util.getCBList(s.metBW2_00000, new[] { 0 }); met_list = Util.getOffsetCBList(met_list, s.metBW2_60000, 60001, new[] { 60002 }); met_list = Util.getOffsetCBList(met_list, s.metBW2_30000, 30001, new[] { 30003 }); met_list = Util.getOffsetCBList(met_list, s.metBW2_00000, 00000, Legal.Met_BW2_0); met_list = Util.getOffsetCBList(met_list, s.metBW2_30000, 30001, Legal.Met_BW2_3); met_list = Util.getOffsetCBList(met_list, s.metBW2_40000, 40001, Legal.Met_BW2_4); met_list = Util.getOffsetCBList(met_list, s.metBW2_60000, 60001, Legal.Met_BW2_6); metGen5 = met_list; } // Gen 6 { var met_list = Util.getCBList(s.metXY_00000, new[] { 0 }); met_list = Util.getOffsetCBList(met_list, s.metXY_60000, 60001, new[] { 60002 }); met_list = Util.getOffsetCBList(met_list, s.metXY_30000, 30001, new[] { 30002 }); met_list = Util.getOffsetCBList(met_list, s.metXY_00000, 00000, Legal.Met_XY_0); met_list = Util.getOffsetCBList(met_list, s.metXY_30000, 30001, Legal.Met_XY_3); met_list = Util.getOffsetCBList(met_list, s.metXY_40000, 40001, Legal.Met_XY_4); met_list = Util.getOffsetCBList(met_list, s.metXY_60000, 60001, Legal.Met_XY_6); metGen6 = met_list; } #endregion }