Ejemplo n.º 1
0
        // Start is called before the first frame update
        void Start()
        {
            spriteRenderer    = GetComponentInChildren <SpriteRenderer>();
            tutorialActivator = GetComponentInParent <TutorialActivator>();

            tutorialLine = GetComponentInChildren <DrawLineBetweenObjects>();

            audioSource = GetComponent <AudioSource>();

            tutorialSteps = tutorialStepsParent.GetComponentsInChildren <TutorialStep>();

            floatTowards = GetComponent <FloatTowards>();

            floatTowards.target1 = TransformUtils.FindTransform("UITarget");

            int count = tutorialSteps.Length;

            for (int i = 0; i < count; i++)
            {
                tutorialSteps[i].tutorial = this;
            }

            EnableCurrentTutorialStep(0, 1); //tutorialSteps[0].requiredCompletions);

            SetTargetTransform(
                tutorialSteps[currentStep].vrDeviceToHighlight,
                tutorialSteps[currentStep].vrInputToHighlight
                );

            StartTutorialVibrationTimer();
        }
 public void SetTutorialOpen(TutorialActivator tutorial)
 {
     openTutorial = tutorial;
     if (openTutorial == null)
     {
         ResetInputHighlight();
     }
 }