diff --git a/Assets/Resources/Prefabs/Cheese.prefab b/Assets/Resources/Prefabs/Cheese.prefab index 125976c..499a4ca 100644 --- a/Assets/Resources/Prefabs/Cheese.prefab +++ b/Assets/Resources/Prefabs/Cheese.prefab @@ -12,7 +12,7 @@ GameObject: - component: {fileID: 8039928902706395577} - component: {fileID: 6580144020370754174} - component: {fileID: 7708323734573527887} - m_Layer: 0 + m_Layer: 10 m_Name: Cheese m_TagString: Cheese m_Icon: {fileID: 0} @@ -151,3 +151,5 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d8ba17a771eb27744ab0d54f89b7ff5b, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::GoalTrigger + bobHeight: 0.3 + bobSpeed: 2.5 diff --git a/Assets/Resources/Scripts/Manager/SpawnManager.cs b/Assets/Resources/Scripts/Manager/SpawnManager.cs index 116664d..11a373e 100644 --- a/Assets/Resources/Scripts/Manager/SpawnManager.cs +++ b/Assets/Resources/Scripts/Manager/SpawnManager.cs @@ -65,6 +65,13 @@ public class SpawnManager : MonoBehaviour return; } + GameObject player = GameObject.FindGameObjectWithTag("Player"); + + if (player != null) + { + Destroy(player); + } + currentPlayer = Instantiate(playerPrefab, spawnPoint.position, Quaternion.identity); AlignToGround(currentPlayer); @@ -113,9 +120,10 @@ public class SpawnManager : MonoBehaviour Destroy(ghost.controller.gameObject); } activeGhostList.Clear(); - + + SpawnPlayer(); currentPlayer.GetComponent().StartRecording(); - + CameraEffect cameraEffect = FindFirstObjectByType(); if (cameraEffect != null) { diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset index 978c1e2..353ef6e 100644 --- a/ProjectSettings/Physics2DSettings.asset +++ b/ProjectSettings/Physics2DSettings.asset @@ -53,5 +53,5 @@ Physics2DSettings: m_ReuseCollisionCallbacks: 1 m_AutoSyncTransforms: 0 m_GizmoOptions: 10 - m_LayerCollisionMatrix: 000000000000000000000000c0000000c0000000000000001801000018010000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_LayerCollisionMatrix: 000000000000000000000000c0000000c0000000000000001805000018010000c00000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 m_PhysicsLowLevelSettings: {fileID: 0} diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index d4c0e0d..6c50620 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -17,7 +17,7 @@ TagManager: - Ghost - GhostHead - Pole - - + - Cheese - - -