Esempio n. 1
0
    private void SetupPath()
    {
        Manager.Sound.PlaySpecificVoiceover(13);
        _turnLeft = !_turnLeft;

        if (count == 2)
        {
            useIndividualized = !useIndividualized;
            usePositive       = !usePositive;
            count             = 0;
        }
        else
        {
            usePositive = !usePositive;
        }

        float gain = 0;

        if (useIndividualized)
        {
            gain = usePositive ? positiveAlg : negativeAlg;
        }
        else
        {
            gain = usePositive ? positiveAvg : negativeAvg;
        }

        FindObjectOfType <Controller>().SetGain(gain);
        _endingEdge = LevelUtilities.EndpointEdge(_startingEdge, _turnLeft);
        Manager.Spawn.MoveEndpoint(_endingEdge, endpoint);
        endpoint.SetActive(true);
        EndpointObject.OnCollision += Endpoint;
    }
Esempio n. 2
0
    private IEnumerator SetupPath(float delay)
    {
        _endingEdge = LevelUtilities.EndpointEdge(_startingEdge, _turnLeft);
        yield return(new WaitForSeconds(delay));

        Manager.Spawn.Path(_turnLeft, _startingEdge);
        Manager.Spawn.Endpoint(_endingEdge);
        EndpointObject.OnCollision += Endpoint;
        StartCoroutine(SetGain(1.0f));
    }
Esempio n. 3
0
 void Start()
 {
     Manager.Sound.SetIndex(6);
     FindObjectOfType <Controller>().SetGain(0);
     Manager.Spawn.PurpleFeet(PurpleFeetSpawn.position);
     FeetObject.OnCollision += Feet;
     _turnLeft         = LevelUtilities.GenerateRandomBool();
     _trainingComplete = false;
     Manager.Sound.PlayNextVoiceover(1.0f); //#6 position purple
 }
Esempio n. 4
0
    void Start()
    {
        FindObjectOfType <Controller>().SetGain(0);
        Manager.Sound.SetIndex(2);
        _completed = false;

        _startingEdge = LevelUtilities.ChooseRandomEdge();
        Manager.Spawn.PurpleFeet(_startingEdge);
        FeetObject.OnCollision += Feet;
        Pointer.Click          += Touchpad;
        _turnLeft = LevelUtilities.GenerateRandomBool();
        Manager.Sound.PlayNextVoiceover(2.0f);
    }
Esempio n. 5
0
    // ReSharper disable once ArrangeTypeMemberModifiers
    void Start()
    {
        Manager.Sound.SetIndex(10);
        FindObjectOfType <Controller>().SetGain(0);
        Manager.Spawn.PurpleFeet(PurpleFeetSpawn.position);
        FeetObject.OnCollision += Feet;

        AlgorithmManager.Complete += Completed;
        _turnLeft = LevelUtilities.GenerateRandomBool();
        Manager.Experiment.GetAlgorithm(out _algorithm);
        Debug.Log(_algorithm);
        Manager.Algorithm.Initialize(_algorithm);
        Manager.Sound.PlayNextVoiceover(); //#9 Experiment now begins, go to feet
        Pointer.Click += Touchpad;
        SetupInitialCalibration();
    }
Esempio n. 6
0
    void Start()
    {
        Manager.Sound.SetIndex(11);
        FindObjectOfType <Controller>().SetGain(0);

        _startingEdge = LevelUtilities.ChooseRandomEdge();
        _turnLeft     = LevelUtilities.GenerateRandomBool();
        Manager.Spawn.PurpleFeet(_startingEdge);
        FeetObject.OnCollision += Feet;
        Pointer.Click          += Touchpad;

        useIndividualized = LevelUtilities.GenerateRandomBool();
        usePositive       = LevelUtilities.GenerateRandomBool();
        Manager.Sound.PlayNextVoiceover(2.0f); //#13 position & follow path
        count      = 0;
        totalCount = 0;
        Manager.Experiment.GetWalkthroughAlgorithm(out algorithm);
        Manager.Experiment.GetThreshold(algorithm, out positiveAlg, out negativeAlg);
        negativeAvg = -0.2f;
        positiveAvg = 0.4f;
        SetupFMS();
    }
Esempio n. 7
0
    private void SetupInitialPath()
    {
        _endingEdge = LevelUtilities.EndpointEdge(_startingEdge, _turnLeft);
        Manager.Spawn.Path(_turnLeft, _startingEdge, out path);
        Manager.Spawn.Endpoint(_endingEdge, out endpoint);

        Manager.Spawn.DiscernmentButtons(_endingEdge, out buttons);
        buttons.SetActive(false);
        EndpointObject.OnCollision += Endpoint;

        float gain = 0;

        if (useIndividualized)
        {
            gain = usePositive ? positiveAlg : negativeAlg;
        }
        else
        {
            gain = usePositive ? positiveAvg : negativeAvg;
        }

        FindObjectOfType <Controller>().SetGain(gain);
    }