private void JoyconSingle() { float[] stick = JoyconHelper.GetLeftJoycon().GetStick(); this.controller.Move(0f, stick[1]); this.controller.Rotate(stick[0]); }
private void Start() { centerCamera = GameObject.FindGameObjectWithTag("MainCamera"); initPos = item.transform.position; joyconLeft = JoyconHelper.GetLeftJoycon(); joyconRight = JoyconHelper.GetRightJoycon(); }
// Start is called before the first frame update void Start() { signWalk = GameObject.Find("WalkText").GetComponent <TextMeshPro>(); signPickUp = GameObject.Find("PickUpText").GetComponent <TextMeshPro>(); signThrow = GameObject.Find("ThrowText").GetComponent <TextMeshPro>(); if (JoyconHelper.GetJoyconsCount() == 0) { string notAvalible = "Kein Joy-Con angeschlossen"; signWalk.text = notAvalible; signPickUp.text = notAvalible; signThrow.text = notAvalible; } else if (JoyconHelper.GetJoyconsCount() == 1) { signWalk.text = "Benutzen Sie bitte den linken Analog-Stick, um sich zu bewegen"; signPickUp.text = "Mit der Taste 'ZR', kann der Ball aufgehoben werden"; signThrow.text = "Mit der Taste 'R' kann der Ball geworfen werden"; } else { signWalk.text = "Benutzen Sie bitte den\n Analog-Stick, um sich zu bewegen"; signPickUp.text = "Mit der Taste 'ZL', kann der Ball aufgehoben werden"; signThrow.text = "Mit der Taste 'L' kann der Ball geworfen werden"; } }
private void JoyconPair() { float[] stickLeft = JoyconHelper.GetLeftJoycon().GetStick(); float[] stickRight = JoyconHelper.GetRightJoycon().GetStick(); this.controller.Move(stickLeft[0], stickLeft[1]); this.controller.Rotate(stickRight[0]); }
public void OnEnable() { this.fpsNextPeriod = Time.realtimeSinceStartup + fpsMeasurePeriod; if (JoyconHelper.Ready()) { this.connectedControllerText.text = string.Format("{0}", JoyconHelper.GetJoycons().Count); this.controllerLeftRightText.text = string.Format("{0} / {1}", JoyconHelper.GetLeftJoycons().Count, JoyconHelper.GetRightJoycons().Count); } }
public void Update() { if (this.controller.FreezeControls) { return; } int joycons = JoyconHelper.GetJoyconsCount(); if (joycons > 0) { if (joycons > 1) { JoyconPair(); } else { JoyconSingle(); } } }
public void Start() { this.leftJoycon = JoyconHelper.GetLeftJoycon(); CloseMenu(); }
public void Start() { this.rightJoycon = JoyconHelper.GetRightJoycon(); }
public DatasetMaker() { _joyconHelper = new JoyconHelper(); _csv = new StringBuilder(); _timer = new Stopwatch(); }