| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 28, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class RedPackConfig : ConfigBase { |
| | | |
| | | public int id { get ; private set ; }
|
| | | public int RedEnvelopeType { get ; private set ; }
|
| | | public int RedEnvelopeAmount { get ; private set ; }
|
| | | public int MoneyType { get ; private set ; }
|
| | | public int PacketCnt { get ; private set ; }
|
| | | public int LeaderOwn { get ; private set ; }
|
| | | public string content { get ; private set; } |
| | | public string PacketOpenTime { get ; private set; } |
| | | public int ValidMinutes { get ; private set ; } |
| | | |
| | | public override string getKey() |
| | | { |
| | | return id.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, February 12, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using UnityEngine;
|
| | | using System;
|
| | |
|
| | | namespace TableConfig {
|
| | |
|
| | | |
| | | public partial class RedPackConfig : ConfigBase {
|
| | |
|
| | | public int id;
|
| | | public int RedEnvelopeType;
|
| | | public int RedEnvelopeAmount;
|
| | | public int MoneyType;
|
| | | public int PacketCnt;
|
| | | public int LeaderOwn;
|
| | | public string content;
|
| | | public string PacketOpenTime;
|
| | | public int ValidMinutes;
|
| | |
|
| | | public override string getKey()
|
| | | {
|
| | | return id.ToString();
|
| | | }
|
| | |
|
| | | public override void Parse(string content) {
|
| | | try
|
| | | {
|
| | | var contents = content.Split('\t');
|
| | |
|
| | | int.TryParse(contents[0],out id);
|
| | |
|
| | | RedEnvelopeType=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | int.TryParse(contents[1],out RedEnvelopeType);
|
| | |
|
| | | RedEnvelopeAmount=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | int.TryParse(contents[2],out RedEnvelopeAmount);
|
| | |
|
| | | MoneyType=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; |
| | | int.TryParse(contents[3],out MoneyType);
|
| | |
|
| | | PacketCnt=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; |
| | | int.TryParse(contents[4],out PacketCnt);
|
| | |
|
| | | LeaderOwn=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; |
| | | int.TryParse(contents[5],out LeaderOwn);
|
| | |
|
| | | content = rawContents[6].Trim();
|
| | | content = contents[6];
|
| | |
|
| | | PacketOpenTime = rawContents[7].Trim();
|
| | | PacketOpenTime = contents[7];
|
| | |
|
| | | ValidMinutes=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | int.TryParse(contents[8],out ValidMinutes);
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|