/// <summary>
 /// Changes the colors of the tooltip's container, line, and font for after a tutorial step
 /// </summary>
 /// <param name="toggling">The Tooltips script instance to use for toggling the tooltips of the corresponding controller the script is attached to</param>
 /// <param name="tooltip">The tooltip to change the color of</param>
 public void ChangeTooltipColorAfterTutorialStep(Tooltips toggling, VRTK_ObjectTooltip tooltip)
 {
     toggling.ChangeContainerColor(tooltip, tipBackgroundColor_AfterTutorialStep);
     toggling.ChangeLineColor(tooltip, tipLineColor_AfterTutorialStep);
     toggling.ChangeFontColor(tooltip, tipTextColor_AfterTutorialStep);
     tooltip.ResetTooltip();
 }
Esempio n. 2
0
        public static TutorialState currentTutorialState; //keeps track of the current tutorial state

        /// <summary>
        /// Initializes all necessary variables and starts the tutorial
        /// </summary>
        void Start()
        {
            stepFinished = false;

            rightTooltips = rightController.GetComponentInChildren <VRTK_ControllerTooltips>();
            leftTooltips  = leftController.GetComponentInChildren <VRTK_ControllerTooltips>();
            rightToggling = rightController.GetComponent <Tooltips>();
            leftToggling  = leftController.GetComponent <Tooltips>();

            leftTooltips.ToggleTips(false);
            rightTooltips.ToggleTips(false);

            currentTutorialState = TutorialState.NONE;

            StartCoroutine(TutorialCoroutine());
        }
        /// <summary>
        /// Initializes all necessary variables and starts the tutorial
        /// </summary>
        void Start()
        {
            stepFinished = false;

            rightTooltips = rightController.GetComponentInChildren <VRTK_ControllerTooltips>();
            leftTooltips  = leftController.GetComponentInChildren <VRTK_ControllerTooltips>();
            rightToggling = rightController.GetComponent <Tooltips>();
            leftToggling  = leftController.GetComponent <Tooltips>();

            leftTooltips.ToggleTips(false);
            rightTooltips.ToggleTips(false);

            currentTutorialState = TutorialState.NONE;

            instruction = GameObject.Find("InstructionCanvas/InstructionText").GetComponent <Text>();

            StartCoroutine(TutorialCoroutine());
        }