diff --git a/Game/.vsconfig b/Game/.vsconfig new file mode 100644 index 0000000..f019fd0 --- /dev/null +++ b/Game/.vsconfig @@ -0,0 +1,6 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Workload.ManagedGame" + ] +} diff --git a/Game/Assets/Scenes/cems scene.unity b/Game/Assets/Scenes/cems scene.unity index b1cd53a..5dc4bab 100644 --- a/Game/Assets/Scenes/cems scene.unity +++ b/Game/Assets/Scenes/cems scene.unity @@ -141,11 +141,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6566899495513628888, guid: d56297e435f8410a584581d73d99d2e4, type: 3} propertyPath: m_LocalPosition.x - value: -4.270053 + value: -2.56 objectReference: {fileID: 0} - target: {fileID: 6566899495513628888, guid: d56297e435f8410a584581d73d99d2e4, type: 3} propertyPath: m_LocalPosition.y - value: 0.7652666 + value: 1.91 objectReference: {fileID: 0} - target: {fileID: 6566899495513628888, guid: d56297e435f8410a584581d73d99d2e4, type: 3} propertyPath: m_LocalPosition.z @@ -202,11 +202,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3} propertyPath: m_LocalPosition.x - value: -4.73 + value: -6.02 objectReference: {fileID: 0} - target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3} propertyPath: m_LocalPosition.y - value: -2.3359 + value: -0.82 objectReference: {fileID: 0} - target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3} propertyPath: m_LocalPosition.z diff --git a/Game/Assets/Scripts/DropletMovement.cs b/Game/Assets/Scripts/DropletMovement.cs index 87f0946..ca5702e 100644 --- a/Game/Assets/Scripts/DropletMovement.cs +++ b/Game/Assets/Scripts/DropletMovement.cs @@ -14,21 +14,32 @@ public class DropletMovement : MonoBehaviour [SerializeField] private float dashDuration; private float dashTime; - // Start is called once before the first execution of Update after the MonoBehaviour is created + private Animator playerAnim; + private float xInput; + + private bool isGrounded = true; + + [SerializeField] private float dashSpeed; + [SerializeField] private float dashDuration; + private float dashTime; + void Start() { rb = GetComponent(); } - // Update is called once per frame void Update() { movement.x = Input.GetAxisRaw("Horizontal"); - movement.y = Input.GetAxisRaw("Vertical"); + + if (isGrounded && Input.GetKeyDown(KeyCode.Space)) + { + rb.linearVelocity = new Vector2(rb.linearVelocity.x, jumpingPower); + } } private void FixedUpdate() { - rb.linearVelocity = movement.normalized * moveSpeed; + rb.linearVelocity = new Vector2(movement.x * moveSpeed, rb.linearVelocity.y); } -} +} \ No newline at end of file