public IBaseTextModel DiaModelSolver(string line) { string[] splitedStr = CutOutStrSet(line); DiaModel diaModel = new DiaModel(NotNullStr(splitedStr[0]), NotNullStr(splitedStr[1]), NotNullStr(splitedStr[2]), NotNullStr(splitedStr[3]), StrToBool(splitedStr[4]), StrToInt(splitedStr[5]), StrToBool(splitedStr[6]), NotNullStr(splitedStr[7]), NotNullStr(splitedStr[8])); return(diaModel); }
private void DisplayDiaModel(IBaseTextModel ibtm) { DiaModel diaModel = (DiaModel)ibtm; uiManager.UpdateSpeakerName(diaModel.name); uiManager.StartCoroutine("UpdateDiaText", diaModel.text); Character character = statsManager.GetCharacter(diaModel.name); Sprite expression = null; switch (diaModel.expression) { case "normal": expression = character.FindExpression(ExpressionType.Normal); break; case "happy": expression = character.FindExpression(ExpressionType.Happy); break; case "angry": expression = character.FindExpression(ExpressionType.Angry); break; case "confused": expression = character.FindExpression(ExpressionType.Confused); break; case "shocking": expression = character.FindExpression(ExpressionType.Shocking); break; } if (expression != null) { uiManager.SetExpression(diaModel.pos, expression); } if (diaModel.audio != "") { audioManager.PlayMusic(diaModel.audio, MusicType.HumanSound); } if (diaModel.isShaking) { animManager.Shake(diaModel.pos); } if (diaModel.isLightning) { animManager.LightningShock(); } if (diaModel.background != "") { uiManager.SetBackGroundImage(diaModel.background); } if (diaModel.bgm != "") { audioManager.PlayMusic(diaModel.bgm, MusicType.BGM); } }