Ejemplo n.º 1
0
    // Start is called before the first frame update
    private void Awake()
    {
        controls        = new UnderstandYou_prototype();
        mouvementCamera = controls.MouvementCamera;

        // mouvementCamera.[action].performed += context => do something
        mouvementCamera.Move.performed  += ctx => horizontalInput = ctx.ReadValue <Vector2>();
        mouvementCamera.Jump.performed  += _ => movement.OnJumpPressed();
        mouvementCamera.Look.performed  += ctx => mouseInput = ctx.ReadValue <Vector2>();
        mouvementCamera.Select.started  += ctx => clickInput.ClickEvent();
        mouvementCamera.Select.canceled += _ => objectInHand.LetItGo();
        //mouvementCamera.LetGo.performed += _ => objectInHand.LetItGo();
    }