JJBB/Assets/Project/Script/GameTables/Table_FellowGrow.cs
2024-08-23 15:49:34 +08:00

76 lines
1.8 KiB
C#

//This code create by CodeEngine ,don't modify
using System;
using System.Collections.Generic;
using System.Collections;
using Module.Log;
namespace GCGame.Table
{
public class Tab_FellowGrow{
public const string TAB_FILE_DATA = "FellowGrow";
private const int _varCount = 10;
public int GetId()
{
return Id;
}
public static bool Validate(string line)
{
var segments = 0;
foreach (char c in line)
if (c == '\t')
segments++;
// Note: skip the 2nd column as it's the description;
var result = segments == _varCount;
if (!result)
LogModule.ErrorLog(string.Format("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", TAB_FILE_DATA, _varCount, segments));
return result;
}
public Tab_FellowGrow()
{
}
public Tab_FellowGrow(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
GrowBase = float.Parse(segments[2]);
GrowMax = float.Parse(segments[3]);
ConsumeType = int.Parse(segments[4]);
ConsumeSubType = int.Parse(segments[5]);
ConsumeNum = int.Parse(segments[6]);
ConsumeTypeBreak = int.Parse(segments[7]);
ConsumeSubTypeBreak = int.Parse(segments[8]);
ConsumeNumBreak = int.Parse(segments[9]);
GrowAdd = int.Parse(segments[10]);
}
public int Id { get; private set; }
public float GrowBase { get; private set; }
public float GrowMax { get; private set; }
public int ConsumeType { get; private set; }
public int ConsumeSubType { get; private set; }
public int ConsumeNum { get; private set; }
public int ConsumeTypeBreak { get; private set; }
public int ConsumeSubTypeBreak { get; private set; }
public int ConsumeNumBreak { get; private set; }
public int GrowAdd { get; private set; }
}
}