private void OnDestroy() { UnityEngine.Object.Destroy((UnityEngine.Object) this.mScene); EventDialogBubble.DiscardAll(); EventDialogBubbleCustom.DiscardAll(); EventStandCharaController2.DiscardAll(); for (int index = 0; index < this.Actions.Length; ++index) { UnityEngine.Object.Destroy((UnityEngine.Object) this.Actions[index]); } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)EventScript.Canvas, (UnityEngine.Object)null)) { return; } ((UnityEvent)((Button)((Component)EventScript.Canvas).GetComponent <Button>()).get_onClick()).RemoveListener(this.mClickAction); HoldGesture component = (HoldGesture)((Component)EventScript.Canvas).GetComponent <HoldGesture>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { // ISSUE: method pointer component.OnHoldStart.RemoveListener(new UnityAction((object)this, __methodptr(OnDown))); // ISSUE: method pointer component.OnHoldEnd.RemoveListener(new UnityAction((object)this, __methodptr(OnUp))); } EventScript.DestroyCanvas(); }
public override void PreStart() { if (!Object.op_Equality((Object)this.mBubble, (Object)null)) { return; } this.mBubble = EventDialogBubble.Find(this.ActorID); if (this.mBubbleResource != null && (Object.op_Equality((Object)this.mBubble, (Object)null) || this.mBubble.Anchor != this.Position)) { this.mBubble = Object.Instantiate(this.mBubbleResource.asset) as EventDialogBubble; ((Component)this.mBubble).get_transform().SetParent(((Component)this.ActiveCanvas).get_transform(), false); this.mBubble.BubbleID = this.ActorID; ((Component)this.mBubble).get_gameObject().SetActive(false); } this.mBubble.AdjustWidth(this.mTextData); this.mBubble.Anchor = this.Position; }
private void OnDestroy() { UnityEngine.Object.Destroy((UnityEngine.Object) this.mScene); EventDialogBubble.DiscardAll(); EventDialogBubbleCustom.DiscardAll(); EventStandCharaController2.DiscardAll(); for (int index = 0; index < this.Actions.Length; ++index) { UnityEngine.Object.Destroy((UnityEngine.Object) this.Actions[index]); } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)EventScript.Canvas, (UnityEngine.Object)null)) { return; } ((UnityEvent)((Button)((Component)EventScript.Canvas).GetComponent <Button>()).get_onClick()).RemoveListener(this.mClickAction); EventScript.DestroyCanvas(); }
private void FlushText() { string mTextQueue = this.mTextQueue; this.mTextQueue = (string)null; if (this.mCharacters == null || this.mCharacters.Length < mTextQueue.Length) { this.mCharacters = new EventDialogBubble.Character[mTextQueue.Length * 2]; } string s = mTextQueue.Replace("<br>", "\n"); EventAction_Dialog.TextSpeedTypes speed = EventAction_Dialog.TextSpeedTypes.Normal; int n = 0; EventDialogBubble.Ctx ctx = new EventDialogBubble.Ctx(); ctx.Interval = speed.ToFloat(); ctx.Color = Color32.op_Implicit(!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BodyText, (UnityEngine.Object)null) ? Color.get_black() : ((Graphic)this.BodyText).get_color()); this.mNumCharacters = 0; this.Parse(EventDialogBubble.SplitTags(s), ref n, (string)null, ctx); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BodyText, (UnityEngine.Object)null)) { this.BodyText.set_text(string.Empty); } this.mStartTime = Time.get_time() + this.FadeInTime; this.mTextNeedsUpdate = this.mNumCharacters > 0; this.mFadingOut = false; this.mCurrentEmotion = this.Emotion; if (string.IsNullOrEmpty(this.VoiceSheetName) || string.IsNullOrEmpty(this.VoiceCueName)) { this.FadeOutVoice(); } else { this.mVoice = new MySound.Voice(this.VoiceSheetName, (string)null, (string)null, EventAction.IsUnManagedAssets(this.VoiceSheetName, false)); this.mVoice.Play(this.VoiceCueName, 0.0f, false); this.VoiceCueName = (string)null; } }
public void AdjustWidth(string bodyText) { if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.BodyText, (UnityEngine.Object)null) || !this.AutoExpandWidth) { return; } EventDialogBubble.Element[] elementArray = EventDialogBubble.SplitTags(bodyText); StringBuilder stringBuilder = new StringBuilder(elementArray.Length); for (int index = 0; index < elementArray.Length; ++index) { if (!string.IsNullOrEmpty(elementArray[index].Value)) { stringBuilder.Append(elementArray[index].Value); } } float num = Mathf.Min(this.BodyText.get_cachedTextGeneratorForLayout().GetPreferredWidth(stringBuilder.ToString(), this.BodyText.GetGenerationSettings(Vector2.get_zero())) / this.BodyText.get_pixelsPerUnit(), this.MaxBodyTextWidth) + this.mBaseWidth; RectTransform transform = ((Component)this).get_transform() as RectTransform; Vector2 sizeDelta = transform.get_sizeDelta(); sizeDelta.x = (__Null)(double)Mathf.Max((float)sizeDelta.x, num); transform.set_sizeDelta(sizeDelta); }