Ejemplo n.º 1
0
    public override bool IncrementStep()
    {
        targets[currentStep].SetActive(false);

        switch (currentStep)
        {
        // If the user enters the home, start tracking time
        case 1:
            ctrler.StartTimer();
            ctrler.CursorController.SetMovementType(reachType[2]);

            // Start green timer bar
            timerIndicator.BeginTimer();

            if (trial.settings.GetString("per_block_type") == "nocursor")
            {
                ctrler.CursorController.SetCursorVisibility(false);
            }

            // Add trackers: current hand position, cursor position
            ctrler.AddTrackedObject("hand_path",
                                    ctrler.Session.CurrentTrial.settings.GetString("per_block_hand") == "l"
                        ? ctrler.CursorController.LeftHand
                        : ctrler.CursorController.RightHand);

            ctrler.AddTrackedObject("cursor_path", ctrler.CursorController.gameObject);

            break;

        case 2:
            if (trackScore && timerIndicator.Timer > 0)
            {
                ctrler.Score++;
            }

            break;
        }

        base.IncrementStep();

        if (!finished)
        {
            // if current step is home step and there is a water animation in the scene, it sets the home ball to innactive
            if (currentStep == 1)
            {
                targets[1].SetActive(false);
            }
            else
            {
                targets[currentStep].SetActive(true);
            }
        }


        return(finished);
    }
Ejemplo n.º 2
0
    public override bool IncrementStep()
    {
        ExperimentController ctrler = ExperimentController.Instance();

        switch (currentStep)
        {
        case 0:     // Enter dock
            targets[0].SetActive(false);
            Home.SetActive(true);
            break;

        case 1:     // Enter home
            Home.SetActive(false);

            ctrler.StartTimer();

            // Create tracker objects
            ctrler.AddTrackedObject("hand_path",
                                    ctrler.Session.CurrentTrial.settings.GetString("per_block_hand") == "l"
                        ? ctrler.CursorController.LeftHand
                        : ctrler.CursorController.RightHand);

            ctrler.AddTrackedObject("cursor_path", ctrler.CursorController.gameObject);

            Target.SetActive(true);

            ExperimentController.Instance().CursorController.SetCursorVisibility(false);

            break;

        case 2:     // Pause in arc
            localizer.SetActive(true);
            Target.GetComponent <ArcScript>().Expand();

            break;

        case 3:     // Select the spot they think their real hand is
            Target.SetActive(false);

            // We use the target variable to store the cursor position
            Target.transform.position =
                ExperimentController.Instance().CursorController.GetHandPosition();

            break;
        }

        base.IncrementStep();
        return(finished);
    }
Ejemplo n.º 3
0
    public override bool IncrementStep()
    {
        switch (currentStep)
        {
        case 0:
            // make the start trigger smaller after the car is picked up
            startCollider.size = new Vector3(startCollider.size.z, startCollider.size.y, 0.1f);

            ctrler.StartTimer();

            ctrler.AddTrackedObject("car_path", car);

            break;

        case 1:
            if (!carPastMidpoint)
            {
                return(false);
            }

            break;
        }


        return(base.IncrementStep());
    }