mirror of
https://github.com/celisej567/forest.git
synced 2026-09-04 15:35:10 +03:00
1
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -70,3 +70,4 @@ crashlytics-build.properties
|
||||
# Temporary auto-generated Android Assets
|
||||
/[Aa]ssets/[Ss]treamingAssets/aa.meta
|
||||
/[Aa]ssets/[Ss]treamingAssets/aa/*
|
||||
*.zip
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -27,7 +27,7 @@ MonoBehaviour:
|
||||
m_SupportsHDR: 1
|
||||
m_MSAA: 1
|
||||
m_RenderScale: 0.4
|
||||
m_UpscalingFilter: 0
|
||||
m_UpscalingFilter: 2
|
||||
m_FsrOverrideSharpness: 0
|
||||
m_FsrSharpness: 0.92
|
||||
m_MainLightRenderingMode: 1
|
||||
|
||||
@@ -27,7 +27,7 @@ MonoBehaviour:
|
||||
m_SupportsHDR: 0
|
||||
m_MSAA: 1
|
||||
m_RenderScale: 0.4
|
||||
m_UpscalingFilter: 0
|
||||
m_UpscalingFilter: 2
|
||||
m_FsrOverrideSharpness: 0
|
||||
m_FsrSharpness: 0.92
|
||||
m_MainLightRenderingMode: 1
|
||||
|
||||
@@ -15,6 +15,9 @@ public class CameraBob : MonoBehaviour
|
||||
CharacterController controller;
|
||||
public bool IsRotating = false;
|
||||
|
||||
//public int XRotStop = 1000;
|
||||
//public int YRotStop = 1000;
|
||||
|
||||
Vector3 StartPos;
|
||||
Quaternion StartRot;
|
||||
|
||||
@@ -57,25 +60,26 @@ public class CameraBob : MonoBehaviour
|
||||
if (!IsRotating)
|
||||
PlayMotion(FootStepMotion());
|
||||
else
|
||||
PlayMotion(FootStepRotation());
|
||||
return;
|
||||
//PlayMotion(FootStepRotation());
|
||||
}
|
||||
|
||||
Vector3 FootStepMotion()
|
||||
{
|
||||
Vector3 pos = Vector3.zero;
|
||||
pos.y += Mathf.Sin(Time.time * Frequency) * Amplitude;
|
||||
pos.x += Mathf.Cos(Time.time * Frequency / 2) * Amplitude *2;
|
||||
pos.y += Mathf.Cos(Time.time * Frequency) * Amplitude;
|
||||
pos.x += Mathf.Sin(Time.time * Frequency / 2) * Amplitude *2;
|
||||
return pos;
|
||||
}
|
||||
|
||||
/*
|
||||
Quaternion FootStepRotation()
|
||||
{
|
||||
Quaternion pos = new Quaternion(0,0,0,0);
|
||||
pos.y += Mathf.Sin(Time.time * Frequency) * Amplitude;
|
||||
pos.x += Mathf.Cos(Time.time * Frequency / 2) * Amplitude * 2;
|
||||
pos.y += Mathf.Sin(Time.time * Frequency) * (Amplitude / YRotStop);
|
||||
pos.x += Mathf.Cos(Time.time * Frequency / 2) * (Amplitude / XRotStop);
|
||||
return pos;
|
||||
}
|
||||
|
||||
*/
|
||||
void ResetPosition()
|
||||
{
|
||||
if (!IsRotating)
|
||||
@@ -86,6 +90,7 @@ public class CameraBob : MonoBehaviour
|
||||
else
|
||||
{
|
||||
if (Camera.localRotation == StartRot) return;
|
||||
Camera.localRotation = Quaternion.Lerp(Camera.localRotation, StartRot, Time.deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,16 +50,16 @@ public class CameraMovement : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator PauseGame()
|
||||
IEnumerable PauseGame()
|
||||
{
|
||||
SceneManager.LoadSceneAsync("pause", LoadSceneMode.Additive);
|
||||
Time.timeScale = 0;
|
||||
return null;
|
||||
}
|
||||
|
||||
IEnumerator UnPauseGame()
|
||||
IEnumerable UnPauseGame()
|
||||
{
|
||||
SceneManager.UnloadSceneAsync("pause" );
|
||||
SceneManager.UnloadSceneAsync("pause");
|
||||
Time.timeScale = 1;
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user