| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, June 29, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, February 12, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using UnityEngine;
|
| | | using System;
|
| | |
|
| | | namespace TableConfig {
|
| | |
|
| | | |
| | | public partial class DialogConfig : ConfigBase {
|
| | |
|
| | | public int id { get ; private set ; }
|
| | | public int npcId { get ; private set ; }
|
| | | public string icon { get ; private set; } |
| | | public string name { get ; private set; } |
| | | public string content { get ; private set; } |
| | | public int nextID { get ; private set ; }
|
| | | public int TalkID { get ; private set ; }
|
| | | |
| | | public int id;
|
| | | public int npcId;
|
| | | public string icon;
|
| | | public string name;
|
| | | public string content;
|
| | | public int nextID;
|
| | | public int TalkID;
|
| | |
|
| | | public override string getKey()
|
| | | {
|
| | | return id.ToString();
|
| | | } |
| | | |
| | | public override void Parse() { |
| | | }
|
| | |
|
| | | public override void Parse(string content) {
|
| | | try
|
| | | {
|
| | | id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | var contents = content.Split('\t');
|
| | |
|
| | | int.TryParse(contents[0],out id);
|
| | |
|
| | | npcId=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | int.TryParse(contents[1],out npcId);
|
| | |
|
| | | icon = rawContents[2].Trim();
|
| | | icon = contents[2];
|
| | |
|
| | | name = rawContents[3].Trim();
|
| | | name = contents[3];
|
| | |
|
| | | content = rawContents[4].Trim();
|
| | | content = contents[4];
|
| | |
|
| | | nextID=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; |
| | | int.TryParse(contents[5],out nextID);
|
| | |
|
| | | TalkID=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; |
| | | int.TryParse(contents[6],out TalkID);
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|