Example #1
0
    void Update()
    {
//Adjust pitch based on WASD movement.
//		thisAudio.pitch = remapRange(rb.velocity.magnitude, 0, 10, 0f, 1.5f);
        thisAudio.pitch = AudioDirector.remapRange(rb.velocity.magnitude, 0, 10, 0f, 1.5f);
        thisAudio.pitch = Mathf.Clamp(thisAudio.pitch, 0.45f, 1.45f);
    }
Example #2
0
    // Update is called once per frame
    void Update()
    {
        BasicAttack();

        if (!aimLockOn)
        {
            basicAttack.panStereo = AudioDirector.remapRange(MouseLook.instance.mouseLookX, -90f, 90f, -1f, 1f);
        }
        else             // only happens for one frame.
        {
            basicAttack.panStereo = attackPan;
        }

        attackVolume = basicAttack.volume;

        LockAim();
    }