]> git.lizzy.rs Git - SuperMouseAdventure.git/blobdiff - 2DGame/Assets/Scripts/Mouse/PlayerController.cs
parallax effect v1.0.1 + better scale
[SuperMouseAdventure.git] / 2DGame / Assets / Scripts / Mouse / PlayerController.cs
diff --git a/2DGame/Assets/Scripts/Mouse/PlayerController.cs b/2DGame/Assets/Scripts/Mouse/PlayerController.cs
deleted file mode 100644 (file)
index 700dc18..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class PlayerController : MonoBehaviour
-{
-    public float speed;
-    float mass;
-    Vector3 gravity;
-    public float gravityScale;
-    public float jumpForce;
-    private float moveInput;
-
-    [HideInInspector]
-    public bool isGrounded;
-    public Transform groundcheck;
-    public float checkRadius;
-    public LayerMask whatIsGround;
-
-    // Start is called before the first frame update
-    void Start()
-    {
-        gravity = new Vector3(0, gravityScale, 0);
-    }
-
-    // Update is called once per frame
-    void Update()
-    {
-        moveInput = Input.GetAxisRaw("Horizontal");
-        
-        if(Input.GetButtonDown("Jump"))
-        {
-            transform.position = new Vector3(transform.position.x, jumpForce, 0);
-        }
-    }
-
-    void FixedUpdate()
-    {
-        isGrounded = Physics2D.OverlapCircle(groundcheck.position, checkRadius, whatIsGround);
-
-        if (!isGrounded)
-        {
-            transform.position -= gravity;
-        }
-
-        transform.position += new Vector3(moveInput * speed, 0, 0);
-    }
-}