Files
JJBB/Assets/Project/Script/GameTables/Table_Teleport.cs

73 lines
1.7 KiB
C#
Raw Normal View History

2024-08-23 15:49:34 +08:00
//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_Teleport{
public const string TAB_FILE_DATA = "Teleport";
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_Teleport()
{
}
public Tab_Teleport(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
TeleportName = segments[2].Trim();
SrcSceneID = int.Parse(segments[3]);
ActiveRadius = float.Parse(segments[4]);
SrcPosX = float.Parse(segments[5]);
SrcPosZ = float.Parse(segments[6]);
DstSceneID = int.Parse(segments[7]);
DstPosX = float.Parse(segments[8]);
DstPosZ = float.Parse(segments[9]);
}
public int Id { get; private set; }
public string TeleportName { get; private set; }
public int SrcSceneID { get; private set; }
public float ActiveRadius { get; private set; }
public float SrcPosX { get; private set; }
public float SrcPosZ { get; private set; }
public int DstSceneID { get; private set; }
public float DstPosX { get; private set; }
public float DstPosZ { get; private set; }
}
}