public override void TASK_END() { base.endTask(); hud.setMessage(""); if (canIncrementLists) { if (objects) { objects.incrementCurrent(); currentObject = objects.currentObject(); } if (texts) { texts.incrementCurrent(); currentText = texts.currentString(); } } GameObject avatar = GameObject.Find("Canvas"); Text canvan = avatar.GetComponent("Canvas").GetComponent <Text>(); string nullstring = null; canvan.text = nullstring; StartCoroutine(storesInactive()); //hud.showEverything(); }
public override void TASK_END() { base.endTask(); viewable = !viewable; compass.active = viewable; //arrow.active = viewable; questionList.incrementCurrent(); current = questionList.currentString(); if (current == null) { parentTask.skip = true; } if (objects) { objects.incrementCurrent(); currentObject = objects.currentObject(); if (currentObject == null) { parentTask.skip = true; } } compassCount++; hud.setMessage(""); //log.log("INFO\tCOMPASS_END\t" + avatarController.transform.position.ToString("f3") + "\t" + arrow.localEulerAngles.ToString("f1") + "\t" + question,1 ); }
public override void endTask() { base.endTask(); if (overideRepeat) { overideRepeat.incrementCurrent(); } // if (pausedTasks) { //currentTask = pausedTasks; //endTask(); // pausedTasks.startTask(); //if (!skip) currentTask.endTask(); }
public override void TASK_END() { base.endTask(); hud.setMessage(""); hud.SecondsToShow = hud.GeneralDuration; if (canIncrementLists) { if (objects) { objects.incrementCurrent(); currentObject = objects.currentObject(); } if (texts) { texts.incrementCurrent(); currentText = texts.currentString(); } } GameObject avatar = manager.player.GetComponent <HUD>().Canvas as GameObject; Text canvas = avatar.GetComponent <Text>(); string nullstring = null; canvas.text = nullstring; // StartCoroutine(storesInactive()); hud.showEverything(); if (actionButtonOn) { // Reset and deactivate action button hud.actionButton.GetComponentInChildren <Text>().text = hud.actionButton.GetComponent <DefaultText>().defaultText; hud.actionButton.GetComponent <Button>().onClick.RemoveListener(hud.OnActionClick); hud.actionButton.SetActive(false); // make the cursor invisible Cursor.lockState = CursorLockMode.Confined; Cursor.visible = false; } // If we turned movement off; turn it back on if (restrictMovement) { manager.player.GetComponent <CharacterController>().enabled = true; manager.scaledPlayer.GetComponent <ThirdPersonCharacter>().immobilized = false; } }
public override void TASK_END() { if (skip) { return; } base.endTask(); items.incrementCurrent(); current = items.currentString(); if (current == null) { skip = true; } hud.setMessage(""); if (gui) { DestroyImmediate(gui.gameObject); } }
public override void TASK_END() { base.endTask(); hud.setMessage(""); if (canIncrementLists) { if (objects) { objects.incrementCurrent(); currentObject = objects.currentObject(); } if (texts) { texts.incrementCurrent(); currentText = texts.currentString(); } } if (gui) { DestroyImmediate(gui.gameObject); } // hud.showEverything(); }
public override void TASK_END() { base.endTask(); hud.setMessage(""); hud.SecondsToShow = hud.GeneralDuration; // Save the rating to a variable depending on the object we're using float sliderValue; float sliderMax; if (vrEnabled) { sliderValue = hud.confidenceSlider.GetComponent <LM_vrSlider>().sliderValue; sliderMax = hud.confidenceSlider.GetComponent <LM_vrSlider>().maxValue; } else { sliderValue = hud.confidenceSlider.GetComponent <Slider>().value; sliderMax = hud.confidenceSlider.GetComponent <Slider>().maxValue; } // ----------------------- // Log Trial info // ----------------------- // Get the parent and grandparent task to provide context in log file var parent = this.parentTask; var masterTask = parent; while (!masterTask.gameObject.CompareTag("Task")) { Debug.Log(masterTask.name); masterTask = masterTask.parentTask; } // Output log for this task in tab delimited format log.log("LM_OUTPUT\tMentalNavigation.cs\t" + masterTask.name + "\t" + this.name + "\n" + "Task\tBlock\tTrial\tTargetName\tRating\tMaxRating\tRT\n" + masterTask.name + "\t" + masterTask.repeatCount + "\t" + parent.repeatCount + "\t" + objects.currentObject().name + "\t" + sliderValue + "\t" + sliderMax + "\t" + (Time.time - startTime) , 1); if (canIncrementLists) { if (objects) { objects.incrementCurrent(); currentObject = objects.currentObject(); } if (texts) { texts.incrementCurrent(); currentText = texts.currentString(); } } GameObject avatar = manager.player.GetComponent <HUD>().Canvas as GameObject; Text canvas = avatar.GetComponent <Text>(); string nullstring = null; canvas.text = nullstring; // StartCoroutine(storesInactive()); if (actionButtonOn) { // Reset and deactivate action button actionButton.GetComponentInChildren <Text>().text = actionButton.GetComponent <DefaultText>().defaultText; hud.actionButton.GetComponent <Button>().onClick.RemoveListener(hud.OnActionClick); hud.actionButton.SetActive(false); // make the cursor invisible Cursor.lockState = CursorLockMode.Confined; Cursor.visible = false; } // Deactivate the slider hud.confidenceSlider.SetActive(false); // If we turned movement off; turn it back on if (restrictMovement) { manager.player.GetComponent <CharacterController>().enabled = true; manager.scaledPlayer.GetComponent <ThirdPersonCharacter>().immobilized = false; } }