private void OnApplicationQuit() { UberText.StoreCachedData(); Network.AppQuit(); W8Touch.AppQuit(); this.UnloadUnusedAssets(); }
public void SetMoneyValue(Network.Bundle bundle, string quantityText) { if ((bundle != null) && !StoreManager.Get().IsProductAlreadyOwned(bundle)) { if (this.m_fullText != null) { this.m_quantityText.gameObject.SetActive(true); this.m_costText.gameObject.SetActive(true); this.m_fullText.gameObject.SetActive(false); } this.m_costText.Text = StoreManager.Get().FormatCostBundle(bundle); this.m_costText.TextColor = this.m_moneyCostTextColor; this.m_quantityText.Text = quantityText; this.m_quantityText.TextColor = this.m_moneyQuantityTextColor; } else { this.m_costText.Text = string.Empty; UberText fullText = this.m_quantityText; if (this.m_fullText != null) { this.m_quantityText.gameObject.SetActive(false); this.m_costText.gameObject.SetActive(false); this.m_fullText.gameObject.SetActive(true); fullText = this.m_fullText; } fullText.Text = GameStrings.Get("GLUE_STORE_PACK_BUTTON_TEXT_PURCHASED"); } this.m_isGold = false; this.UpdateButtonState(); }
private void LayoutLeftText(UberText text, Transform bone, Vector3 offset, Component rightComponent) { if (text.gameObject.activeInHierarchy) { text.Width = this.ComputeLeftComponentWidth(bone, offset, rightComponent); TransformUtil.SetPoint((Component)text, Anchor.LEFT, (Component)bone, Anchor.RIGHT, offset); } }
private void Awake() { this.m_textMesh = base.GetComponent <UberText>(); if (UniversalInputManager.UsePhoneUI != null) { this.m_phoneGem = AssetLoader.Get().LoadActor("Resource_Large_phone", false, false); GameUtils.SetParent(this.m_phoneGem, this.m_phoneGemContainer, true); } }
protected override void OnDataSet(bool updateVisuals) { if (updateVisuals) { GoldRewardData data = base.Data as GoldRewardData; if (data == null) { Debug.LogWarning(string.Format("goldRewardData.SetData() - data {0} is not GoldRewardData", base.Data)); } else { string headline = GameStrings.Get("GLOBAL_REWARD_GOLD_HEADLINE"); string details = data.Amount.ToString(); string source = string.Empty; UberText text = this.m_coin.GetComponentsInChildren <UberText>(true)[0]; if (text != null) { base.m_rewardBanner.m_detailsText = text; base.m_rewardBanner.AlignHeadlineToCenterBone(); } NetCache.ProfileNotice.NoticeOrigin origin = base.Data.Origin; switch (origin) { case NetCache.ProfileNotice.NoticeOrigin.BETA_REIMBURSE: headline = GameStrings.Get("GLOBAL_BETA_REIMBURSEMENT_HEADLINE"); source = GameStrings.Get("GLOBAL_BETA_REIMBURSEMENT_DETAILS"); break; case NetCache.ProfileNotice.NoticeOrigin.TOURNEY: { NetCache.NetCacheRewardProgress netObject = NetCache.Get().GetNetObject <NetCache.NetCacheRewardProgress>(); object[] args = new object[] { netObject.WinsPerGold }; source = GameStrings.Format("GLOBAL_REWARD_GOLD_SOURCE_TOURNEY", args); break; } default: if (origin == NetCache.ProfileNotice.NoticeOrigin.IGR) { if (data.Date.HasValue) { object[] objArray2 = new object[] { data.Date }; string str4 = GameStrings.Format("GLOBAL_CURRENT_DATE", objArray2); object[] objArray3 = new object[] { str4 }; source = GameStrings.Format("GLOBAL_REWARD_GOLD_SOURCE_IGR_DATED", objArray3); } else { source = GameStrings.Get("GLOBAL_REWARD_GOLD_SOURCE_IGR"); } } break; } base.SetRewardText(headline, details, source); } } }
private void OnDestroy() { UnityEngine.Object.Destroy(this.m_name); this.m_name = null; UnityEngine.Object.Destroy(this.m_body); this.m_body = null; UnityEngine.Object.Destroy(this.m_background); this.m_background = null; }
private void ButtonPlay_Click(object sender, EventArgs e) { DeckPickerTrayDisplay deckPickerTrayDisplay = DeckPickerTrayDisplay.Get(); PlayButton playButton = deckPickerTrayDisplay.m_playButton; UberText newPlayButtonText2 = playButton.m_newPlayButtonText; Vector3 center = newPlayButtonText2.m_TextMeshGameObject.Renderer.Bounds.m_Center; //DefaultBot.ilog_0.InfoFormat("[TournamentScene_DeckPicker] Now clicking the \"{0}\" button.", newPlayButtonText2.Text); Client.LeftClickAt(center); }
private void DropText() { UberText text = this.m_creditsText1; if (this.m_currentText == this.m_creditsText1) { text = this.m_creditsText2; } float z = 1.8649f; TransformUtil.SetPoint(this.m_currentText.gameObject, Anchor.FRONT, text.gameObject, Anchor.BACK, new Vector3(0f, 0f, z)); }
private void FlopCredits() { if (this.m_currentText == this.m_creditsText1) { this.m_currentText = this.m_creditsText2; } else { this.m_currentText = this.m_creditsText1; } this.m_currentText.Text = this.GetNextCreditsChunk(); this.DropText(); }
private void OnFatigueActorLoaded(string actorName, GameObject actorObject, object callbackData) { if (actorObject == null) { UnityEngine.Debug.LogWarning(string.Format("FatigueSpellController.OnFatigueActorLoaded() - FAILED to load actor \"{0}\"", actorName)); this.DoFinishFatigue(); } else { Actor component = actorObject.GetComponent <Actor>(); if (component == null) { UnityEngine.Debug.LogWarning(string.Format("FatigueSpellController.OnFatigueActorLoaded() - ERROR actor \"{0}\" has no Actor component", actorName)); this.DoFinishFatigue(); } else { Player.Side controllerSide = base.GetSource().GetControllerSide(); bool flag = controllerSide == Player.Side.FRIENDLY; this.m_fatigueActor = component; UberText nameText = this.m_fatigueActor.GetNameText(); if (nameText != null) { nameText.Text = GameStrings.Get("GAMEPLAY_FATIGUE_TITLE"); } UberText powersText = this.m_fatigueActor.GetPowersText(); if (powersText != null) { object[] objArray1 = new object[] { this.m_fatigueTagChange.Value }; powersText.Text = GameStrings.Format("GAMEPLAY_FATIGUE_TEXT", objArray1); } component.SetCardBackSideOverride(new Player.Side?(controllerSide)); component.UpdateCardBack(); ZoneDeck deck = !flag?GameState.Get().GetOpposingSidePlayer().GetDeckZone() : GameState.Get().GetFriendlySidePlayer().GetDeckZone(); deck.DoFatigueGlow(); this.m_fatigueActor.transform.localEulerAngles = FATIGUE_ACTOR_INITIAL_LOCAL_ROTATION; this.m_fatigueActor.transform.localScale = FATIGUE_ACTOR_START_SCALE; this.m_fatigueActor.transform.position = deck.transform.position; Vector3[] vectorArray = new Vector3[] { this.m_fatigueActor.transform.position, new Vector3(this.m_fatigueActor.transform.position.x, this.m_fatigueActor.transform.position.y + 3.6f, this.m_fatigueActor.transform.position.z), Board.Get().FindBone("FatigueCardBone").position }; object[] args = new object[] { "path", vectorArray, "time", 1.2f, "easetype", iTween.EaseType.easeInSineOutExpo }; iTween.MoveTo(this.m_fatigueActor.gameObject, iTween.Hash(args)); object[] objArray3 = new object[] { "rotation", FATIGUE_ACTOR_FINAL_LOCAL_ROTATION, "time", 1.2f, "delay", 0.15f }; iTween.RotateTo(this.m_fatigueActor.gameObject, iTween.Hash(objArray3)); iTween.ScaleTo(this.m_fatigueActor.gameObject, FATIGUE_ACTOR_FINAL_SCALE, 1f); base.StartCoroutine(this.WaitThenFinishFatigue(0.8f)); } } }
public static Bounds ComputeSetPointBounds(GameObject go, bool includeInactive) { Bounds bounds; UberText component = go.GetComponent <UberText>(); if (component != null) { return(component.GetTextWorldSpaceBounds()); } Renderer renderer = go.GetComponent <Renderer>(); if (renderer != null) { return(renderer.bounds); } Collider collider = go.GetComponent <Collider>(); if (collider == null) { return(GetBoundsOfChildren(go, includeInactive)); } if (collider.enabled) { bounds = collider.bounds; } else { collider.enabled = true; bounds = collider.bounds; collider.enabled = false; } MobileHitBox box = go.GetComponent <MobileHitBox>(); if ((box != null) && box.HasExecuted()) { bounds.size = new Vector3(bounds.size.x / box.m_scaleX, bounds.size.y / box.m_scaleY, bounds.size.z / box.m_scaleY); } return(bounds); }
private void OnApplicationPause(bool pauseStatus) { if (UnityEngine.Time.frameCount != 0) { if (pauseStatus) { this.m_lastPauseTime = UnityEngine.Time.realtimeSinceStartup; if (this.Paused != null) { this.Paused(); } UberText.StoreCachedData(); Network.ApplicationPaused(); } else { this.m_hasResetSinceLastResume = false; float num = UnityEngine.Time.realtimeSinceStartup - this.m_lastPauseTime; UnityEngine.Debug.Log("Time spent paused: " + num); if ((DemoMgr.Get().GetMode() == DemoMode.APPLE_STORE) && (num > 180f)) { this.ResetImmediately(false, false); } this.m_lastResumeTime = UnityEngine.Time.realtimeSinceStartup; if (this.Unpaused != null) { this.Unpaused(); } Network.ApplicationUnpaused(); if (SceneMgr.Get().IsModeRequested(SceneMgr.Mode.FATAL_ERROR)) { this.ResetImmediately(false, false); } } } }
public void UpdateNumberText(UberText textMesh, string newText, bool shouldHide) { object[] objArray1 = new object[] { textMesh, newText, shouldHide }; base.method_9("UpdateNumberText", new Class272.Enum20[] { Class272.Enum20.Class }, objArray1); }
public void LayoutLeftText(UberText text, Transform bone, Vector3 offset, Component rightComponent) { object[] objArray1 = new object[] { text, bone, offset, rightComponent }; base.method_8("LayoutLeftText", objArray1); }
private void AssignCardCount() { this.m_countTextMesh = base.m_rootObject.transform.FindChild("CardCountText").GetComponent <UberText>(); }
public void UpdateKeywordHelpForHistoryCard(Triton.Game.Mapping.Entity entity, Actor actor, UberText createdByText) { object[] objArray1 = new object[] { entity, actor, createdByText }; base.method_8("UpdateKeywordHelpForHistoryCard", objArray1); }
public void DisableTextMesh(UberText mesh) { object[] objArray1 = new object[] { mesh }; base.method_8("DisableTextMesh", objArray1); }
public void UpdateTextColor(UberText uberTextMesh, int baseNumber, int currentNumber, bool higherIsBetter) { object[] objArray1 = new object[] { uberTextMesh, baseNumber, currentNumber, higherIsBetter }; base.method_9("UpdateTextColor", new Class272.Enum20[] { Class272.Enum20.Class }, objArray1); }
public void UpdateTextColorToGreenOrWhite(UberText uberTextMesh, int baseNumber, int currentNumber) { object[] objArray1 = new object[] { uberTextMesh, baseNumber, currentNumber }; base.method_8("UpdateTextColorToGreenOrWhite", objArray1); }
public void UpdateTextColor(UberText originalMesh, int baseNumber, int currentNumber) { object[] objArray1 = new object[] { originalMesh, baseNumber, currentNumber }; base.method_9("UpdateTextColor", new Class272.Enum20[] { Class272.Enum20.Class }, objArray1); }
public void UpdateText(UberText uberTextMesh, string text) { object[] objArray1 = new object[] { uberTextMesh, text }; base.method_8("UpdateText", objArray1); }
private GameObject CreateRewardInstance(int rewardIndex, Vector3 rewardPos, bool activeOnStart) { RewardData data = this.m_Rewards[rewardIndex]; GameObject go = null; switch (data.RewardType) { case Reward.Type.ARCANE_DUST: { go = UnityEngine.Object.Instantiate <GameObject>(this.m_RewardSets.m_RewardDust); TransformUtil.AttachAndPreserveLocalTransform(go.transform, this.m_Root.transform); go.transform.position = rewardPos; go.SetActive(true); UberText componentInChildren = go.GetComponentInChildren <UberText>(); ArcaneDustRewardData data2 = (ArcaneDustRewardData)data; componentInChildren.Text = data2.Amount.ToString(); go.SetActive(activeOnStart); break; } case Reward.Type.BOOSTER_PACK: { BoosterPackRewardData data3 = data as BoosterPackRewardData; int id = data3.Id; if (id == 0) { id = 1; UnityEngine.Debug.LogWarning("RewardBoxesDisplay - booster reward is not valid. ID = 0"); } Log.Kyle.Print(string.Format("Booster DB ID: {0}", id), new object[0]); string assetName = GameDbf.Booster.GetRecord(id).GetAssetName("ARENA_PREFAB"); if (string.IsNullOrEmpty(assetName)) { UnityEngine.Debug.LogError(string.Format("RewardBoxesDisplay - no prefab found for booster {0}!", data3.Id)); } else { go = AssetLoader.Get().LoadGameObject(assetName, true, false); TransformUtil.AttachAndPreserveLocalTransform(go.transform, this.m_Root.transform); go.transform.position = rewardPos; go.SetActive(activeOnStart); } break; } case Reward.Type.CARD: { go = UnityEngine.Object.Instantiate <GameObject>(this.m_RewardSets.m_RewardCard); TransformUtil.AttachAndPreserveLocalTransform(go.transform, this.m_Root.transform); go.transform.position = rewardPos; go.SetActive(true); CardRewardData cardData = (CardRewardData)data; go.GetComponentInChildren <RewardCard>().LoadCard(cardData, this.m_layer); go.SetActive(activeOnStart); break; } case Reward.Type.CARD_BACK: { go = UnityEngine.Object.Instantiate <GameObject>(this.m_RewardSets.m_RewardCardBack); TransformUtil.AttachAndPreserveLocalTransform(go.transform, this.m_Root.transform); go.transform.position = rewardPos; go.SetActive(true); CardBackRewardData cardbackData = (CardBackRewardData)data; go.GetComponentInChildren <RewardCardBack>().LoadCardBack(cardbackData, this.m_layer); go.SetActive(activeOnStart); break; } case Reward.Type.GOLD: { go = UnityEngine.Object.Instantiate <GameObject>(this.m_RewardSets.m_RewardGold); TransformUtil.AttachAndPreserveLocalTransform(go.transform, this.m_Root.transform); go.transform.position = rewardPos; go.SetActive(true); UberText text2 = go.GetComponentInChildren <UberText>(); GoldRewardData data4 = (GoldRewardData)data; text2.Text = data4.Amount.ToString(); go.SetActive(activeOnStart); break; } } if (go == null) { UnityEngine.Debug.LogWarning("RewardBoxesDisplay: Unable to create reward, object null!"); return(null); } if (rewardIndex >= this.m_RewardObjects.Length) { UnityEngine.Debug.LogWarning("RewardBoxesDisplay: CreateRewardInstance reward index exceeded!"); return(null); } SceneUtils.SetLayer(go, this.m_layer); this.m_RewardObjects[rewardIndex] = go; this.m_InstancedObjects.Add(go); return(go); }
public void UpdateNumberText(UberText textMesh, string newText) { Class272.Enum20[] enumArray1 = new Class272.Enum20[] { Class272.Enum20.Class, Class272.Enum20.String }; object[] objArray1 = new object[] { textMesh, newText }; base.method_9("UpdateNumberText", enumArray1, objArray1); }
public void OverrideNameText(UberText newText) { object[] objArray1 = new object[] { newText }; base.method_8("OverrideNameText", objArray1); }