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

82 lines
2.0 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_SnareObjInfo{
public const string TAB_FILE_DATA = "SnareObjInfo";
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_SnareObjInfo()
{
}
public Tab_SnareObjInfo(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
CharModelId = int.Parse(segments[2]);
RotationType = int.Parse(segments[3]);
AliveEffectId[0] = int.Parse(segments[4]);
AliveEffectId[1] = int.Parse(segments[5]);
AliveEffectId[2] = int.Parse(segments[6]);
AliveSoundId[0] = int.Parse(segments[7]);
AliveSoundId[1] = int.Parse(segments[8]);
AliveSoundId[2] = int.Parse(segments[9]);
ActivateEffectId = int.Parse(segments[10]);
}
public int Id { get; private set; }
public int CharModelId { get; private set; }
public int RotationType { get; private set; }
public readonly int[] AliveEffectId = new int[3];
public int getAliveEffectIdCount() { return AliveEffectId.Length; }
public int GetAliveEffectIdbyIndex(int idx)
{
if(idx >= 0 && idx < AliveEffectId.Length)
return AliveEffectId[idx];
return default(int);
}
public readonly int[] AliveSoundId = new int[3];
public int getAliveSoundIdCount() { return AliveSoundId.Length; }
public int GetAliveSoundIdbyIndex(int idx)
{
if(idx >= 0 && idx < AliveSoundId.Length)
return AliveSoundId[idx];
return default(int);
}
public int ActivateEffectId { get; private set; }
}
}