Add files via upload
Some first day fug fixes.
This commit is contained in:
parent
7046716893
commit
a29bc6aba4
7 changed files with 123 additions and 10 deletions
|
@ -20,9 +20,14 @@ public static class ScreenShake{
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>Shake the camera
|
||||
/// <para>It needs a cinemachine camera with a noise profile in it.</para>
|
||||
/// </summary>
|
||||
public static void Shake(float intensity, float time){
|
||||
if(vCam == null || shakeUpdate == null){
|
||||
if(vCam == null){
|
||||
vCam = Camera.main.GetComponent<CinemachineBrain>().ActiveVirtualCamera.VirtualCameraGameObject.GetComponent<CinemachineVirtualCamera>();
|
||||
}
|
||||
if(shakeUpdate == null){
|
||||
shakeUpdate = new GameObject("ShakeUpdate").AddComponent<ScreenShakeUpdate>();
|
||||
}
|
||||
shakeUpdate.startingIntensity = intensity;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue