81 lines
1.9 KiB
C#
81 lines
1.9 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_SceneMovie{
|
|
|
|
public const string TAB_FILE_DATA = "SceneMovie";
|
|
private const int _varCount = 11;
|
|
|
|
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_SceneMovie()
|
|
{
|
|
}
|
|
|
|
public Tab_SceneMovie(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
Id = int.Parse(segments[0]);
|
|
TriggerType = int.Parse(segments[2]);
|
|
TriggerParam[0] = int.Parse(segments[3]);
|
|
TriggerParam[1] = int.Parse(segments[4]);
|
|
TriggerParam[2] = int.Parse(segments[5]);
|
|
TriggerParam[3] = int.Parse(segments[6]);
|
|
ResPath[0] = segments[7].Trim();
|
|
ResPath[1] = segments[8].Trim();
|
|
ResPath[2] = segments[9].Trim();
|
|
ResPath[3] = segments[10].Trim();
|
|
FindMissionId = int.Parse(segments[11]);
|
|
|
|
}
|
|
|
|
public int Id { get; private set; }
|
|
|
|
public int TriggerType { get; private set; }
|
|
|
|
public readonly int[] TriggerParam = new int[4];
|
|
public int getTriggerParamCount() { return TriggerParam.Length; }
|
|
public int GetTriggerParambyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < TriggerParam.Length)
|
|
return TriggerParam[idx];
|
|
return default(int);
|
|
}
|
|
|
|
public readonly string[] ResPath = new string[4];
|
|
public int getResPathCount() { return ResPath.Length; }
|
|
public string GetResPathbyIndex(int idx)
|
|
{
|
|
if(idx >= 0 && idx < ResPath.Length)
|
|
return ResPath[idx];
|
|
return default(string);
|
|
}
|
|
|
|
public int FindMissionId { get; private set; }
|
|
|
|
|
|
}
|
|
} |