70 lines
1.6 KiB
C#
70 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_AnimationCurve{
|
|
|
|
public const string TAB_FILE_DATA = "AnimationCurve";
|
|
private const int _varCount = 8;
|
|
|
|
public int GetId()
|
|
{
|
|
return AnimCurveId;
|
|
}
|
|
|
|
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_AnimationCurve()
|
|
{
|
|
}
|
|
|
|
public Tab_AnimationCurve(string line)
|
|
{
|
|
var segments = line.Split('\t');
|
|
AnimCurveId = int.Parse(segments[0]);
|
|
Time = float.Parse(segments[2]);
|
|
Value = float.Parse(segments[3]);
|
|
InTangent = float.Parse(segments[4]);
|
|
OutTangent = float.Parse(segments[5]);
|
|
TangentMode = int.Parse(segments[6]);
|
|
PreWrapMode = int.Parse(segments[7]);
|
|
PostWrapMode = int.Parse(segments[8]);
|
|
|
|
}
|
|
|
|
public int AnimCurveId { get; private set; }
|
|
|
|
public float Time { get; private set; }
|
|
|
|
public float Value { get; private set; }
|
|
|
|
public float InTangent { get; private set; }
|
|
|
|
public float OutTangent { get; private set; }
|
|
|
|
public int TangentMode { get; private set; }
|
|
|
|
public int PreWrapMode { get; private set; }
|
|
|
|
public int PostWrapMode { get; private set; }
|
|
|
|
|
|
}
|
|
} |