//------------------------------------------------------------------------------
//工具生成，请勿修改。
//配置文件名称：role.xlsx。
//------------------------------------------------------------------------------
export default class RoleCFG
{
	public id:number;//角色id
	public name:string;//角色资源名
	public speed:number;//角色前进移动速度(米/秒)
	public frontjump:any;//前跳加速度
	public leftjump:any;//左跳加速度
	public rightjump:any;//右跳加速度
	public upclimb:number;//爬升速度
	public slideclimb:any;//斜着爬楼速度
	public getState:number;//获取角色方式
	public need:number;//获取角色花费
	public icon:string;//图标icon
	public gravity:number;//重力加速度
	public rolename:string;//角色名字
	public static dict:any = {};
	public static vec:Array<RoleCFG> = [];
	public static initCfg(str:string):void
	{
		var i:number=0;
		var arr:Array<string> = str.split("\n");
		var i:number=0;
		for(i = 0; i < arr.length; i++)
		{
			var singleStr:string = arr[i];
			var singleArr:Array<string> = singleStr.split("&");
			if(RoleCFG.dict[singleArr[0]])continue;
			var item:RoleCFG= new RoleCFG();
			item.id= Number(singleArr[0]);
			item.name=singleArr[1];
			item.speed= Number(singleArr[2]);
			item.frontjump= JSON.parse(singleArr[3]);
			item.leftjump= JSON.parse(singleArr[4]);
			item.rightjump= JSON.parse(singleArr[5]);
			item.upclimb= Number(singleArr[6]);
			item.slideclimb= JSON.parse(singleArr[7]);
			item.getState= Number(singleArr[8]);
			item.need= Number(singleArr[9]);
			item.icon=singleArr[10];
			item.gravity= Number(singleArr[11]);
			item.rolename=singleArr[12];
			RoleCFG.dict[item.id]=item;
			RoleCFG.vec.push(item);
		}
	}

}