Commit e01b1daa by Tim Reiter

Merge branch 'master' of ssh://git.breab.org:2222/gamejam-gpn15/dyingIsMainstream

Conflicts: Assets/Scripts/PlayerControl.cs
parents 3f8d4410 66550528
......@@ -10,7 +10,6 @@ public class DeserializedLevelsLoader
private DeserializedLevels deserializedLevels;
private int currentLevelIndex = 0;
private int currentSegmentIndex = 0;
private const string prefabsFolder = "Prefabs/";
......
......@@ -6,8 +6,6 @@ using GamepadInput;
public class PlayerControl : MonoBehaviour
{
private Rigidbody2D body2D;
private Vector3 lastPos; // we make sure the last Pos is never the curPos.
private Vector2 moveDirection;
public Transform groundCheck;
public LayerMask mask;
......@@ -87,9 +85,6 @@ public class PlayerControl : MonoBehaviour
void FixedUpdate()
{
//Update last position:
lastPos = transform.position;
if (isGrounded())
velocity.y = 0;
......@@ -164,9 +159,6 @@ public class PlayerControl : MonoBehaviour
//finally set the velocity:
Debug.Log(velocity.y);
body2D.velocity = velocity + currentPushSpeed;
//update move direction after the currentposition was updated:
moveDirection = (transform.position - lastPos).normalized;
}
private bool isGrounded()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment