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

73 lines
1.6 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_WeaponModel{
public const string TAB_FILE_DATA = "WeaponModel";
private const int _varCount = 9;
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_WeaponModel()
{
}
public Tab_WeaponModel(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
ResPathR = segments[2].Trim();
ResPathL = segments[3].Trim();
Scale = float.Parse(segments[4]);
HangPos = segments[5].Trim();
HangRot = segments[6].Trim();
BodyPos = segments[7].Trim();
BodyRot = segments[8].Trim();
HandPoint = segments[9].Trim();
}
public int Id { get; private set; }
public string ResPathR { get; private set; }
public string ResPathL { get; private set; }
public float Scale { get; private set; }
public string HangPos { get; private set; }
public string HangRot { get; private set; }
public string BodyPos { get; private set; }
public string BodyRot { get; private set; }
public string HandPoint { get; private set; }
}
}