コード例 #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;
    }
コード例 #2
0
ファイル: Level2.cs プロジェクト: cnhutton/working_RDW_backup
    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));
    }
コード例 #3
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);
    }