public void SetText(int localizedID) { if (localizedID == 0) { text.text = ""; } else { text.text = Localization.text(localizedID); typeWriter.Play(); } }
static int Play(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); FXTypeWriter obj = (FXTypeWriter)ToLua.CheckObject(L, 1, typeof(FXTypeWriter)); obj.Play(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
IEnumerator Play() { int index = 0; while (index < localizedID.Length) { yield return(new WaitForSeconds(_TimeDelay[index])); if (index < text.Length) { _Text.text = text[index]; } else { _Text.text = Localization.text(localizedID[index])[0].ToString(); } _TypeWriter.Play(); index++; } }