Example #1
0
        public void WeaponCremaShake(FrameEventInfo.CameraShakeType cameraShakeType = FrameEventInfo.CameraShakeType.None)
        {
            ConstrainedCamera constrainedCamera = Camera.main.GetComponent <ConstrainedCamera>();

            switch (cameraShakeType)
            {
            case FrameEventInfo.CameraShakeType.CameraShake:
                constrainedCamera.Shake(1f, 1f, 50, 90f, false, true);
                break;

            case FrameEventInfo.CameraShakeType.LswdCameraShake:
                constrainedCamera.Shake(0.3f, 0.4f, 50, 90f, false, true);
                break;

            case FrameEventInfo.CameraShakeType.LswdCameraShakefierce:
                constrainedCamera.Shake(0.5f, 0.7f, 50, 90f, false, true);
                break;

            case FrameEventInfo.CameraShakeType.SwdCameraShake:
                constrainedCamera.Shake(0.3f, 0.2f, 50, 90f, false, true);
                break;

            case FrameEventInfo.CameraShakeType.SwdCameraShakefierce:
                constrainedCamera.Shake(0.5f, 0.5f, 50, 90f, false, true);
                break;

            case FrameEventInfo.CameraShakeType.None:
                // constrainedCamera.Shake(0.3f, 0.2f, 50, 90f, false, true);
                break;

            case FrameEventInfo.CameraShakeType.smallshape:
                constrainedCamera.Shake(0.2f, 0.5f, 100, 90f, false, true);
                break;

            case FrameEventInfo.CameraShakeType.mediumshape:
                constrainedCamera.Shake(0.2f, 1f, 100, 90f, false, true);
                break;

            case FrameEventInfo.CameraShakeType.bigshape:
                constrainedCamera.Shake(0.2f, 1.5f, 100, 90f, false, true);
                break;

            default:
                break;
            }
        }
Example #2
0
        public void Shake(float duration, float strength = 1, int vibrato = 10, float randomness = 90, bool snapping = false, bool fadeOut = true)
        {
            ConstrainedCamera constrainedCamera = Camera.main.GetComponent <ConstrainedCamera>();

            constrainedCamera.Shake(duration, strength, vibrato, randomness, snapping, fadeOut);
        }