public void SetText(string text, string icon, int type, string soundName) { if (mShowText != null) { mShowText.text = text; if (mTypewriterEffect == null) { mTypewriterEffect = mShowText.gameObject.GetComponent <TypewriterEffect>(); } mTypewriterEffect.EnabledTypewriter(); mTypewriterEffect.TypeWriteStopEvent += OnTypeWriteStopEvent; if (soundName != "") { mDialogSoundSource = Globals.Instance.MSoundManager.PlayTaskSoundEffect("Sounds/TaskSound/" + soundName); } } }