示例#1
0
    void Awake()
    {
        current = this;

        mover    = GetComponent <Mover2D>();
        animator = GetComponent <Animator>();

        inputs = new Inputs();
        inputs.Player.Move.performed     += (x) => mover.v2MoveInput.x = x.ReadValue <float>();
        inputs.Player.Jump.performed     += (x) => mover.JumpDown();
        inputs.Player.Jump.canceled      += (x) => mover.JumpUp();
        inputs.Player.Interact.performed += (x) => { if (!Game.current.PAUSED)
                                                     {
                                                         Interact();
                                                     }
        };
    }