Esempio n. 1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.CompareTag("Player"))
        {
            PlayerController playerController = other.gameObject.GetComponent <PlayerController>();
            playerController.jumpMultiplier *= jumpMultiplier;

            audioSource.PlayOneShot(jumperZoneClips[Random.Range(0, jumperZoneClips.Length)]);

            cameraShake.ResetToDefault();
            // cameraShake.recoverySpeed = 0.1f;
            cameraShake.frequency      = 25.0f;
            cameraShake.traumaExponent = 0.8f;
            cameraShake?.InduceStress(0.01f);
        }
    }
Esempio n. 2
0
    void StartFightVFX(GameObject touchingChaser)
    {
        GameObject shakeGameobject = GameObject.FindGameObjectWithTag("CameraShake");

        cameraShake = shakeGameobject?.GetComponent <ShakeableTransform>();
        if (fightVFX != null && !fightVFX.isPlaying)
        {
            fightVFX.Play();
            cameraShake.ResetToDefault();
            cameraShake.maximumAngularShake = new Vector3(15, 15, 15);
            cameraShake.recoverySpeed       = 0.3f;
            cameraShake.frequency           = 5.0f;
            cameraShake.traumaExponent      = 1.53f;
            cameraShake.InduceStress(0.3f);
        }
    }