Unity MVP architecture

113 Views Asked by At

I'm trying to make an MVP architecture in a unity 2d project. My idea is to separate presenter and model from the engine.
And so the question is how to make the player move correctly.

public class PlayerModel
{
    private Vector2 position;
    private float speed;
    public void UpdatePosition(Vector2 movement)
    {
        position += movement * speed * Time.deltaTime;
    }
}

My problem is that Vector2 and Time.deltaTime are pulled from UnityEngine.

0

There are 0 best solutions below