// Update is called once per frame void Update() { if (!isDemo) { if (Input.GetKeyDown(KeyCode.Space)) //if(OVRInput.GetDown(OVRInput.Button.One)) { if (!started) { started = true; currentStage = EXP_STAGE.TUTORIAL; stagesDone[0] = true; notificationsMannager.lightStepNotification(1); if (notificacionTextObject != null) { TextMesh text = notificacionTextObject.GetComponent <TextMesh>(); text.text = "TUTORIAL"; } if (persistanceManager != null) { persistanceManager.saveGeneral(); } else { Debug.LogError("PersistanceMannager missing!!! No results reported"); } //Call persistance to update } else { nextStage(); } trackerMannager.setTrackers(); } else if (Input.GetKeyDown(KeyCode.R)) { setNew(); notificationsMannager.normalSettings(); persistanceManager.recording = false; GameObject leftProp = GameObject.Find("LeftProp"); if (leftProp != null) { leftProp.GetComponent <PropController>().angleNumber = 0; } GameObject rightProp = GameObject.Find("RightProp"); if (rightProp != null) { rightProp.GetComponent <PropController>().angleNumber = 0; } } } }
public void nextStage() { persistanceManager.recording = true; if (stageCounter < 4) { logic.stage = -1; stageCounter++; int newStage = ordersStages[subjectOrder, stageCounter - 1]; stagesDone[newStage] = true; currentStage = stages[newStage]; if (notificacionTextObject != null) { TextMesh text = notificacionTextObject.GetComponent <TextMesh>(); text.text = "Stage number : " + stageCounter; } } if (stageCounter >= 2 && stageCounter <= 5) { surveyMannager.startSurvey(stageCounter, currentStage.ToString("G")); } }
// Start is called before the first frame update void Start() { persistanceManager = gameObject.GetComponent <PersistanceManager>(); trackerMannager = gameObject.GetComponent <TrackerMannager>(); notificationsMannager = gameObject.GetComponent <NotificationsMannager>(); surveyMannager = gameObject.GetComponent <SurveyMannager>(); logic = gameObject.GetComponent <Logic>(); surveyActivated = false; if (!isDemo) { setNew(); } else { currentStage = EXP_STAGE.PROP_MATCHING_PLUS_RETARGETING; notificationsMannager.lightStepNotification(1); started = true; if (notificacionTextObject != null) { TextMesh text = notificacionTextObject.GetComponent <TextMesh>(); text.text = "Welcome!!"; } if (persistanceManager != null) { persistanceManager.storeLocal = false; persistanceManager.storeInForms = false; } trackerMannager.setTrackers(); } //Debug.Log("-----------Waiting---------"); }