protected override void onReplayEnd() { base.onReplayEnd (); if(CurrentExpState == ExperiementState.Designer_Replaying) Application.LoadLevel("IETesterInfo"); else if(CurrentExpState == ExperiementState.Player_Replaying) { //load next level IEExperiment.dataFilePath = string.Format("SAVE_{0}_{1}.dat",IEExperiment.PNum,System.DateTime.Now.ToString("MM_dd_yyyy_HH_mm")); // SAVE_PNumber_month_day_year_hour_minutes IEExperiment.SceneMode = SceneBase.SceneModeEnum.Record; IEExperiment.CurrentExpState = IEExperiment.ExperiementState.Player_Recording; Application.LoadLevel("IEExperiment"); } }
private void addPlaySecondVideoTask() { Task task = new Task (); task.TaskText = "PLEASE ALERT YOUR EXPERIMENTER THAT YOU HAVE FINISHED THE FIRST PORTION OF THE EXPERIMENT. Thank you for completing the first part of pointing test. You will now be taken on a separate route of the environment. Please pay attention to the locations of the major named landmarks encountered in the environment."; task.OnTaskStart += (Task self) => { PlayerObject.Instance.EnableMovement(false); PlayerObject.Instance.EnableLooking(false); ShowTaskInfo(self.TaskText,true); MainCamera.gameObject.SetActive(false); OrthCamera.gameObject.SetActive(false); return false; }; task.OnTaskProgressCheck += (Task self) => {return PlayerInput.IsInteractiveKeyDown();}; task.OnTaskEnd += (Task self) => { PlayerObject.Instance.EnableMovement(true); PlayerObject.Instance.EnableLooking(true); MainCamera.gameObject.SetActive(true); OrthCamera.gameObject.SetActive(false); //play second video IEExperiment.dataFilePath = string.Format("Ian_Replay2.dat"); IEExperiment.SceneMode = SceneBase.SceneModeEnum.Replay; IEExperiment.CurrentExpState = IEExperiment.ExperiementState.Player_Replaying; IEExperiment.IsSecondTime = true; IEExperiment.Append = true; // append the same file Application.LoadLevel("IEExperiment"); return false; }; taskMgr.PushTask(task); }