public override void SetData(SmsDialogVo vo) { _data = vo; LayoutRebuilder.MarkLayoutForRebuild(transform.parent as RectTransform); RollToEnd(); StartCoroutine(ShowWaitForInput()); }
public SmsDialogVo Clone() { SmsDialogVo vo = new SmsDialogVo(); vo.IsLeft = IsLeft; vo.ContextText = ContextText; return(vo); }
private void AddNewItem() { SmsDialogVo data = _smsVo.dialogList[_currentIndex]; _currentSmsItem = CreateItem(data.IsLeft); _currentSmsItem.SetData(data); _currentIndex++; string roleName = data.IsLeft ? _smsVo.GetRoleName() : GlobalData.PlayerModel.PlayerVo.UserName; SendMessage(new Message(MessageConst.CMD_STORY_RECODE_DIALOG, Message.MessageReciverType.DEFAULT, data, roleName)); }
public void AddDialog(object obj, string heroName) { if (stringBuilder == null) { stringBuilder = new StringBuilder(); } Type type = obj.GetType(); if (type == typeof(EntityVo)) { EntityVo entity = (EntityVo)obj; if (entity.id == "0") { stringBuilder.Append("【旁白】"); } else { stringBuilder.Append("【") .Append(heroName) .Append("】"); } stringBuilder.Append(entity.dialog) .Append("\n\n"); } else if (type == typeof(TelephoneDialogVo)) { TelephoneDialogVo telDialogVo = (TelephoneDialogVo)obj; stringBuilder.Append("【") .Append(heroName) .Append("】"); stringBuilder.Append(telDialogVo.Content) .Append("\n\n"); } else if (type == typeof(SmsDialogVo)) { SmsDialogVo smsDialogVo = (SmsDialogVo)obj; stringBuilder.Append("【") .Append(heroName) .Append("】"); stringBuilder.Append(smsDialogVo.ContextText) .Append("\n\n"); } }
public virtual void SetData(SmsDialogVo smsVo) { _data = smsVo; SetText(_data.ContextText); }