diff --git a/Assets/Scenes/CreditScreen.unity b/Assets/Scenes/CreditScreen.unity index b4e3acd..3b82770 100644 --- a/Assets/Scenes/CreditScreen.unity +++ b/Assets/Scenes/CreditScreen.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e26dc08f3aa4112b840f41591cc9b9ef1f9bbf9576b8be6eece37b2efa91fdd -size 43060 +oid sha256:05b23051d4afd7c8c3a60ed6d24255d4b6916577ff1da28f20977c52b62f41e7 +size 50920 diff --git a/Assets/Scenes/MainGameplayScene.unity b/Assets/Scenes/MainGameplayScene.unity index 3082652..caa7433 100644 --- a/Assets/Scenes/MainGameplayScene.unity +++ b/Assets/Scenes/MainGameplayScene.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6069490cacd12580489009ce45afb97c078cae059a29b451704bb7b3bfe590a -size 723701 +oid sha256:e7937ddf8a7e02f45d709b8c3bd7a572d26e56674bcac7f06e0d9121463dd6ad +size 729828 diff --git a/Assets/Scripts/Behaviours/YeetController.cs b/Assets/Scripts/Behaviours/YeetController.cs index 76d35f8..d28b001 100644 --- a/Assets/Scripts/Behaviours/YeetController.cs +++ b/Assets/Scripts/Behaviours/YeetController.cs @@ -34,7 +34,7 @@ public class YeetController : InputBehaviour private LineRenderer m_lineRenderer; private AudioSource m_audioSource; - private Transform m_OldChildParent; + private Transform m_SpawnerTransform; private Vector3 preyeetPosition; @@ -46,6 +46,7 @@ public class YeetController : InputBehaviour m_body = this.gameObject; m_audioSource = gameObject.AddComponent(); m_audioSource.spatialBlend = 0f; + m_SpawnerTransform = FindObjectOfType().transform; } public void Hold(GameObject child) @@ -53,7 +54,6 @@ public class YeetController : InputBehaviour m_audioSource.clip = childClips[Random.Range(0, childClips.Length)]; _child = child; - m_OldChildParent = _child.transform.parent; _child.transform.parent = parent.transform; _child.GetComponent().held = true; _child.GetComponent().lastHeld = parent; @@ -86,7 +86,7 @@ public class YeetController : InputBehaviour m_YeetAnimator.SetBool("Yeet", false); m_YeetAnimator.SetBool("Carry", false); - _child.transform.parent = m_OldChildParent; + _child.transform.parent = m_SpawnerTransform; _child.transform.rotation = parent.transform.rotation; _child.GetComponent().held = false; diff --git a/Assets/Scripts/UI/CreditScreen/CreditUIController.cs b/Assets/Scripts/UI/CreditScreen/CreditUIController.cs index 621c822..445aa97 100644 --- a/Assets/Scripts/UI/CreditScreen/CreditUIController.cs +++ b/Assets/Scripts/UI/CreditScreen/CreditUIController.cs @@ -29,6 +29,9 @@ public class CreditUIController : MonoBehaviour [SerializeField] public List m_Credits; + [SerializeField,NaughtyAttributes.Scene] + public string m_MainMenuScene; + private int Count; @@ -115,6 +118,11 @@ public class CreditUIController : MonoBehaviour newPlayer.SetActive(true); } + public void OnMenuClick() + { + UnityEngine.SceneManagement.SceneManager.LoadScene(m_MainMenuScene); + } + [System.Serializable] public struct CreditReferences { diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 2c53139..9ac6c1a 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26f7563e3dad7732e38901ab1688479fcca9aa84f54919c275ceb2a12bf3dc74 -size 872 +oid sha256:c6330f096713c099369a5de5586ffec65b1b41d0ada9362ad1de6b93c37ba73b +size 661 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 5ec2a9f..001fcae 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfa00f978614a8162ec54ba46c54081ce759eaa79f92f6111fbb91b6e04ae1eb -size 19462 +oid sha256:d88b3d2951616af8e631b2b6f91c1c9053bb3d0230ccfe1d7dec476195e937a4 +size 19727