﻿using UnityEngine;
using System.Collections.Generic;

public class PlayerMovement
{
    private const float Gravity = -1.0f;

    public bool IsOnGround { get; set; }

    public Vector3 Update()
    {
        if (IsOnGround)
        {
            return Vector2.zero;
        }
        return new Vector3(0.0f, Gravity);
    }
}
﻿using UnityEngine;
using System.Collections.Generic;

public class PlayerMovement
{
    private const float Gravity = -1.0f;

    public bool IsOnGround { get; set; }

    private Vector3 currentVelocity;

    public Vector3 Update()
    {
        if (IsOnGround)
        {
            return Vector2.zero;
        }
        currentVelocity += new Vector3(0.0f, Gravity);
        return currentVelocity;
    }
}
Test for accelerating whilst falling now passes
Test for accelerating whilst falling now passes
