Ejemplo n.º 1
0
    //Camera表格信息提取
    public bool CameraAdd(DataRow camera_row, string id)
    {
        bool isRight = true;
        CameraInfoManager cameraMana  = new CameraInfoManager();
        CameraMotion      cameraExcel = cameraMana.CameraInfoGet(camera_row, id, ref isRight);

        if (!isRight)
        {
            return(false);
        }
        _motionList.Add(cameraExcel);
        simpleID.Add(simpleID.Count, id);
        return(true);
    }
Ejemplo n.º 2
0
	//摄像机运动模块
	private IEnumerator CameraCoroutine(string came_str, DataTable camera_table)
	{
		string[] cameArray = came_str.Split('|');
        float camera_time = 0f;
		for(int i = 0; i < cameArray.Length; i++){
			string cameKeyStr = InterData.CmdCheck(cameArray[i], "CAMERA");
			if(cameKeyStr != ""){
				//摄像机运动信息提取
				DataRow cameRowData = camera_table.Rows.Find(cameKeyStr);
				//ID获取CAMERA行失败
				if(cameRowData == null){
					MotionPara.shouldStop = stopInRow;
					if(MotionPara.isEditor){
						Debug.LogError(ErrorLocation.Locate("MAIN", "CAMERA", MotionPara.mainRowNumber) + ", CAMERA 没有这个ID!");
					}
					continue;
				}
				bool isRight = true;
				CameraInfoManager tempInfoManager = new CameraInfoManager();
				cameraAdministrator = tempInfoManager.CameraInfoGet(cameRowData, cameKeyStr, ref isRight);
				if(!isRight){
					MotionPara.shouldStop = stopInRow;
					yield break;
				}
				if (!computeTime)
				{
					cameraAdministrator.Init();
					cameraFlag = true;
					startTime = 0;
					MotionPara.MotionActive = true;
					cameraAdministrator.State = CurrentState.Active;
					yield return StartCoroutine(CameraTimer());
				}
				else
				{
					cameraAdministrator.Init();
                    camera_time += cameraAdministrator.StandardTime;
					cameraAdministrator.PostProcess();
				}
			}else{
				MotionPara.shouldStop = stopInRow;
				//编辑器模式下会出现警报信息
				if(MotionPara.isEditor){
					Debug.LogError(ErrorLocation.Locate("MAIN", "CAMERA", MotionPara.mainRowNumber));
				}
			}	
		}
        if (computeTime)
		{
			cameraTime = camera_time;
		}
		yield return null;
	}
Ejemplo n.º 3
0
	//Camera表格信息提取
	public bool CameraAdd(DataRow camera_row, string id)
	{
		bool isRight = true;
		CameraInfoManager cameraMana = new CameraInfoManager();
		CameraMotion cameraExcel = cameraMana.CameraInfoGet(camera_row, id, ref isRight);
		if(!isRight){
			return false;
		}
		_motionList.Add(cameraExcel);
		simpleID.Add(simpleID.Count, id);
		return true;
	}