protected void Move()
        {
            var input = InputVector();

            entity.Move(InputVector());
            rigidbody.MovePosition(entity.position);
            OnMove.ForEach(action => action.Invoke(entity));
        }
Ejemplo n.º 2
0
    private void HandleMovement()
    {
        var horizontal = Input.GetAxis("Horizontal");
        var vertical   = Input.GetAxis("Vertical");

        if (horizontal != 0 || vertical != 0)
        {
            movementBehaviour.Move(horizontal, vertical);
        }
    }
Ejemplo n.º 3
0
    void Update()
    {
        CollisionInfo collInfo = collisions.getCollisions();

        direction = collInfo.right ? -1 : collInfo.left ? 1 : direction;
        movement.Move(direction * localTime);
        if (jumps)
        {
            Jump();
        }
    }