Esempio n. 1
0
    private void Start()
    {
        float value = 4.0f;

        while (value >= 5.0f && value <= 6.0f)
        {
            value = Random.Range(0.0f, 10.0f);
        }
        obj.SetParameterValue(paramSound, Mathf.Clamp(value, obj.GetParameterMinRange(paramSound), obj.GetParameterMaxRange(paramSound)));
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        int tmp = Random.Range(0, 10);

        wantedValue = Random.Range(0, 10);
        while (tmp == wantedValue)
        {
            tmp = Random.Range(0, 10);
        }
        source.SetParameterValue("param01", tmp);
    }
Esempio n. 3
0
    private void UpdateValueObj()
    {
        float value;

        if (obj == null)
        {
            return;
        }
        value  = objSound.GetParameterValue(paramSound);
        value += incr;
        if (value > objSound.GetParameterMaxRange(paramSound) || value < objSound.GetParameterMinRange(paramSound))
        {
            this.ActiveDialog(eventDialog[1], true);
        }
        else
        {
            objSound.SetParameterValue(paramSound, Mathf.Clamp(value, objSound.GetParameterMinRange(paramSound), objSound.GetParameterMaxRange(paramSound)));
        }
    }