//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_Jump{

    public const string TAB_FILE_DATA = "Jump";
	private const int _varCount = 15;
	
	public int GetId()
	{
		return JumpId;
	}
	
	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_Jump()
	{
	}
	
	public Tab_Jump(string line)
	{
		var segments = line.Split('\t');
          JumpId = int.Parse(segments[0]);
          RangeRadius = float.Parse(segments[2]);
          SceneClassId = int.Parse(segments[3]);
          StartPosX = float.Parse(segments[4]);
          StartPosZ = float.Parse(segments[5]);
          SprintPosX = float.Parse(segments[6]);
          SprintPosZ = float.Parse(segments[7]);
          Animation[0] = int.Parse(segments[8]);
Animation[1] = int.Parse(segments[9]);
Animation[2] = int.Parse(segments[10]);
          EndPosX = float.Parse(segments[11]);
          EndPosY = float.Parse(segments[12]);
          EndPosZ = float.Parse(segments[13]);
          Duration = int.Parse(segments[14]);
          NextJumpId = int.Parse(segments[15]);

	}
  
    public int JumpId { get; private set; }
  
    public float RangeRadius { get; private set; }
  
    public int SceneClassId { get; private set; }
  
    public float StartPosX { get; private set; }
  
    public float StartPosZ { get; private set; }
  
    public float SprintPosX { get; private set; }
  
    public float SprintPosZ { get; private set; }
  
	public readonly int[] Animation = new int[3];
	public int getAnimationCount() { return Animation.Length; } 
	public int GetAnimationbyIndex(int idx)
    {
		if(idx >= 0 && idx < Animation.Length)
			return Animation[idx];
		return default(int);
    }
  
    public float EndPosX { get; private set; }
  
    public float EndPosY { get; private set; }
  
    public float EndPosZ { get; private set; }
  
    public int Duration { get; private set; }
  
    public int NextJumpId { get; private set; }
  

    }
}