diff --git a/Assets/Scenes/Game.unity b/Assets/Scenes/Game.unity index e2cb4c92..298454e8 100644 --- a/Assets/Scenes/Game.unity +++ b/Assets/Scenes/Game.unity @@ -554,7 +554,6 @@ GameObject: - component: {fileID: 1047239738} - component: {fileID: 1047239740} - component: {fileID: 1047239739} - - component: {fileID: 1047239741} - component: {fileID: 1047239742} m_Layer: 0 m_Name: Capsule @@ -626,22 +625,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1047239737} m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} ---- !u!54 &1047239741 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1047239737} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 --- !u!114 &1047239742 MonoBehaviour: m_ObjectHideFlags: 0 @@ -861,7 +844,6 @@ MonoBehaviour: runningSpeed: 11.5 jumpSpeed: 8 gravity: 20 - playerCamera: {fileID: 643334563} lookSpeed: 5 lookXLimit: 45 canMove: 1 diff --git a/Assets/Scripts/Manager/CameraManager.cs b/Assets/Scripts/Manager/CameraManager.cs index ebb610ae..1c2ee186 100644 --- a/Assets/Scripts/Manager/CameraManager.cs +++ b/Assets/Scripts/Manager/CameraManager.cs @@ -5,14 +5,22 @@ public class CameraManager : MonoBehaviour public Camera fpCamera; public Camera tpCamera; - private void Start() + public void Start() { fpCamera.enabled = true; + Player.playerCamera = fpCamera; tpCamera.enabled = false; } private void Update() { + if (fpCamera.enabled) + { + Player.playerCamera = fpCamera; + }else + { + Player.playerCamera = tpCamera; + } if (Input.GetKeyDown(KeyCode.Tab)) { if (fpCamera.enabled) diff --git a/Assets/Scripts/Player.cs b/Assets/Scripts/Player.cs index d624c892..3d712d9d 100644 --- a/Assets/Scripts/Player.cs +++ b/Assets/Scripts/Player.cs @@ -9,7 +9,7 @@ public class Player : MonoBehaviour public float runningSpeed = 11.5f; public float jumpSpeed = 8.0f; public float gravity = 20.0f; - public Camera playerCamera; + public static Camera playerCamera; public float lookSpeed = 2.0f; public float lookXLimit = 45.0f; @@ -22,8 +22,6 @@ public class Player : MonoBehaviour private void Start() { characterController = GetComponent(); - - Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; } diff --git a/fmod_editor.log b/fmod_editor.log index 5f55d312..af1ccec3 100644 --- a/fmod_editor.log +++ b/fmod_editor.log @@ -18,10 +18,10 @@ [LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135) [LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135) [LOG] PlaybackSystem::acquireMasterBus : Setting master channel group format to 6 -[LOG] SoundI::release : (000001DD0159E388) -[LOG] SoundI::release : footsteps (000001DD07541288) -[LOG] SoundI::release : (000001DCE9AA8418) -[LOG] SoundI::release : lift (000001DD0753E6A8) +[LOG] SoundI::release : (000001DCB8545D68) +[LOG] SoundI::release : footsteps (000001DD12B013C8) +[LOG] SoundI::release : (000001DCB8545078) +[LOG] SoundI::release : lift (000001DD12B01D88) [LOG] Thread::callback : FMOD Studio update thread finished. [LOG] Thread::callback : FMOD Studio bank load thread finished. [LOG] Profile::disconnectAll : Profiler disconnecting all clients @@ -32,10 +32,3 @@ [LOG] Thread::callback : FMOD mixer thread finished. [LOG] Profile::disconnectAll : Profiler disconnecting all clients [LOG] SystemI::close : Closed. -[LOG] Thread::callback : FMOD Studio bank load thread finished. -[LOG] Thread::callback : FMOD Studio sample load thread finished. -[LOG] LiveUpdate::release : -[LOG] LiveUpdate::reset : Reset connection (reason Disconnected) -[LOG] Thread::callback : FMOD stream thread finished. -[LOG] Thread::callback : FMOD mixer thread finished. -[LOG] SystemI::close : Closed.