コード例 #1
0
 private void BindInputs(InputSet inputSet, PlayerSelectionDummy dummy, bool isController)
 {
     object[] paramLeft = new object[2];
     paramLeft[0] = -1;
     paramLeft[1] = dummy;
     object[] paramRight = new object[2];
     paramRight[0] = 1;
     paramRight[1] = dummy;
     inputSet.AddInput("left-selection", SetDummySelection, isAxis: isController, parameters: paramLeft);
     inputSet.AddInput("right-selection", SetDummySelection, isAxis: isController, parameters: paramRight);
     inputSet.isActive = true;
 }
コード例 #2
0
    private void BindInputs()
    {
        if (inputs == null || player == null)
        {
            return;
        }

        object[] primaryParameters = new object[1];
        primaryParameters[0] = 0;

        object[] secondaryParameters = new object[1];
        secondaryParameters[0] = 1;
        inputs.AddInput("primary", player.InputAction, parameters: primaryParameters);
        inputs.AddInput("secondary", player.InputAction, parameters: secondaryParameters);
        inputs.isActive = true;
    }