diff --git a/Assets/Movement.cs b/Assets/Scripts/Movement.cs similarity index 100% rename from Assets/Movement.cs rename to Assets/Scripts/Movement.cs diff --git a/Assets/Movement.cs.meta b/Assets/Scripts/Movement.cs.meta similarity index 100% rename from Assets/Movement.cs.meta rename to Assets/Scripts/Movement.cs.meta diff --git a/Assets/PickUpObject.cs b/Assets/Scripts/PickUpObject.cs similarity index 90% rename from Assets/PickUpObject.cs rename to Assets/Scripts/PickUpObject.cs index 4fabcf9..dbea3ba 100644 --- a/Assets/PickUpObject.cs +++ b/Assets/Scripts/PickUpObject.cs @@ -11,6 +11,7 @@ public class PickUpObject : MonoBehaviour public bool carrying = false; public GameObject carriableObject; public float throwForce; + public KeyCode interactKey = KeyCode.F; // Start is called before the first frame update void Start() { @@ -20,12 +21,12 @@ public class PickUpObject : MonoBehaviour // Update is called once per frame void Update() { - if(insideTrigger && Input.GetKeyDown(KeyCode.F) && !carrying) + if(insideTrigger && Input.GetKeyDown(interactKey) && !carrying) { carrying = true; carriableObject.GetComponent().isKinematic = true; } - else if(carrying && Input.GetKeyDown(KeyCode.F)) + else if(carrying && Input.GetKeyDown(interactKey)) { carrying = false; carriableObject.GetComponent().isKinematic = false; diff --git a/Assets/PickUpObject.cs.meta b/Assets/Scripts/PickUpObject.cs.meta similarity index 100% rename from Assets/PickUpObject.cs.meta rename to Assets/Scripts/PickUpObject.cs.meta