Ejemplo n.º 1
0
    private JoyconInput CreateJoyconInput(int controllerId, bool usesPlus)
    {
        JoyconInput ji = ScriptableObject.CreateInstance <JoyconInput>();

        ji.SetControllerNumber(controllerId, usesPlus);

        return(ji);
    }
 //----------------------Change Step Size----------------------//
 //q && Right Trigger
 private void ChangeStepSizeInputManager()
 {
     //Rechts Links vertauscht beim Trigger??
     if (JoyconInput.GetButtonUp("Trigger R") || Input.GetKeyDown(KeyCode.Q))
     {
         ChangeStepSize();
     }
 }
 public void UpdateDisplaySelection()
 {
     if (JoyconInput.GetButtonDown("Trigger L"))
     {
         this.selectedDisplay -= this.selectedDisplay > 0 ? 1 : 0;
     }
     else if (JoyconInput.GetButtonDown("Trigger R"))
     {
     }
     //this.selectedDisplay += this.selectedDisplay < this.configurationManager.ConfigurationMeshes.Count - 1 ? 1 : 0;
 }
    public void Update()
    {
        UpdateDisplaySelection();

        UpdateVertexSelection();
        MapVertexIndex();

        Vector3 v = new Vector3(JoyconInput.GetAxis("Horizontal R"), JoyconInput.GetAxis("Vertical R"), 0f);

        this.configurationManager.ConfigurationMeshes[this.selectedDisplay].ConfigurationVertices[mappedVertex].Move(v);
    }
 private void UpdateVertexSelection()
 {
     if (JoyconInput.GetAxis("Horizontal L") < 0)
     {
         this.selectedVertex &= ~(1 << 0);
     }
     else if (JoyconInput.GetAxis("Horizontal L") > 0)
     {
         this.selectedVertex |= 1 << 0;
     }
     if (JoyconInput.GetAxis("Vertical L") > 0)
     {
         this.selectedVertex &= ~(1 << 1);
     }
     else if (JoyconInput.GetAxis("Vertical L") < 0)
     {
         this.selectedVertex |= 1 << 1;
     }
 }