Exemple #1
0
    //Excel表格信息提取总入口
    public bool ExcelAdd(DataRow excel_row, string id, DataTable group_table)
    {
        bool isRight = true;
        //Motion Type
        int motionInt = IntConversion(excel_row[3].ToString(), ref isRight);

        if (!isRight)
        {
            if (MotionPara.isEditor)
            {
                Debug.LogError(ErrorLocation.Locate("EXCEL", "MOTIONTYPE", id) + ",运动方式填写错误!");
            }
            return(false);
        }
        ExcelInfoManager excelMana = new ExcelInfoManager();

        if (motionInt == 1 || motionInt == 2 || motionInt == 3 || motionInt == 4 || motionInt == 5 || motionInt == 6)
        {          //运动符合要求
            BasicMotion excelMotion = excelMana.SimpleMotion(excel_row, id, group_table, ref isRight, motionInt);
            if (!isRight)
            {
                return(false);
            }
            _motionList.Add(excelMotion);
        }
        else
        {          //报错
            if (MotionPara.isEditor)
            {
                Debug.LogError(ErrorLocation.Locate("EXCEL", "MOTIONTYPE", id) + ",运动方式填写错误,暂时未包含该种运动方式!");
            }
            return(false);
        }
        simpleID.Add(simpleID.Count, id);
        return(true);
    }
	//Excel表格信息提取总入口
	public bool ExcelAdd(DataRow excel_row, string id, DataTable group_table)
	{
		bool isRight = true;
		//Motion Type
		int motionInt = IntConversion(excel_row[3].ToString(), ref isRight);
		if(!isRight){
			if(MotionPara.isEditor){
				Debug.LogError(ErrorLocation.Locate("EXCEL", "MOTIONTYPE", id) + ",运动方式填写错误!");
			}
			return false;
		}
		ExcelInfoManager excelMana = new ExcelInfoManager();
		if (motionInt == 1 || motionInt == 2 || motionInt == 3 || motionInt == 4 || motionInt == 5 || motionInt == 6)
		{  //运动符合要求
			BasicMotion excelMotion = excelMana.SimpleMotion(excel_row, id, group_table, ref isRight, motionInt);
			if(!isRight){
				return false;
			}
			_motionList.Add(excelMotion);
		}
		else
		{  //报错
			if(MotionPara.isEditor){
				Debug.LogError(ErrorLocation.Locate("EXCEL", "MOTIONTYPE", id) + ",运动方式填写错误,暂时未包含该种运动方式!");
			}
			return false;
		}
		simpleID.Add(simpleID.Count, id);
		return true;
	}