diff --git a/Assets/Scenes/Test Scene.unity b/Assets/Scenes/Test Scene.unity index c6f241d..86ccba7 100644 --- a/Assets/Scenes/Test Scene.unity +++ b/Assets/Scenes/Test Scene.unity @@ -2225,7 +2225,7 @@ BoxCollider2D: adaptiveTiling: 0 m_AutoTiling: 0 serializedVersion: 2 - m_Size: {x: 2.048, y: 2.048} + m_Size: {x: 5.12, y: 5.12} m_EdgeRadius: 0 --- !u!212 &1118546611 SpriteRenderer: @@ -3865,7 +3865,7 @@ BoxCollider2D: adaptiveTiling: 0 m_AutoTiling: 0 serializedVersion: 2 - m_Size: {x: 2.048, y: 2.048} + m_Size: {x: 5.12, y: 5.12} m_EdgeRadius: 0 --- !u!212 &1635882675 SpriteRenderer: @@ -4512,7 +4512,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1928466015} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -7, y: 0, z: 0} + m_LocalPosition: {x: -5, y: 0, z: 0} m_LocalScale: {x: 0.5, y: 0.5, z: 1} m_Children: [] m_Father: {fileID: 0} diff --git a/Assets/Scripts/GMScript.cs b/Assets/Scripts/GMScript.cs index 7c54d97..1834b11 100644 --- a/Assets/Scripts/GMScript.cs +++ b/Assets/Scripts/GMScript.cs @@ -195,6 +195,22 @@ public class GMScript : MonoBehaviour } + if (Input.GetMouseButtonDown(0)) + { + + Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition); + Vector2 mousePos2D = new Vector2(mousePos.x, mousePos.y); + + RaycastHit2D hit = Physics2D.Raycast(mousePos2D, Vector2.zero); + + if (hit.collider != null) { + if(hit.collider.gameObject.tag == "Restart") + { + SceneManager.LoadScene(SceneManager.GetActiveScene().name); + } + } + } + if(cursorLock) {