void Start()
 {
     volDown = new VolumeToAction(gameObject.GetComponent<AudioSource>(), 0.0f, 5.0f);
     volDown.SetGraph(Graph.Exponential);
     VolumeToAction volUp = new VolumeToAction(gameObject.GetComponent<AudioSource>(), 1.0f, 5.0f);
     volUp.SetGraph(Graph.InverseExponential);
     sequence = new ActionSequence(volDown, volUp);
     forever = new ActionRepeatForever(sequence);
     ActionHandler.RunAction(forever);
 }
Exemple #2
0
    void Start()
    {
        volDown = new VolumeToAction(gameObject.GetComponent <AudioSource>(), 0.0f, 5.0f);
        volDown.SetGraph(Graph.Exponential);
        VolumeToAction volUp = new VolumeToAction(gameObject.GetComponent <AudioSource>(), 1.0f, 5.0f);

        volUp.SetGraph(Graph.InverseExponential);
        sequence = new ActionSequence(volDown, volUp);
        forever  = new ActionRepeatForever(sequence);
        ActionHandler.RunAction(forever);
    }