Example #1
0
        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";
        }
    }
Example #4
0
        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]);
        }
Example #5
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);
            }
        }
Example #6
0
        public void Update()
        {
            if (this.controller.FreezeControls)
            {
                return;
            }

            int joycons = JoyconHelper.GetJoyconsCount();

            if (joycons > 0)
            {
                if (joycons > 1)
                {
                    JoyconPair();
                }
                else
                {
                    JoyconSingle();
                }
            }
        }
Example #7
0
 public void Start()
 {
     this.leftJoycon = JoyconHelper.GetLeftJoycon();
     CloseMenu();
 }
Example #8
0
 public void Start()
 {
     this.rightJoycon = JoyconHelper.GetRightJoycon();
 }
Example #9
0
 public DatasetMaker()
 {
     _joyconHelper = new JoyconHelper();
     _csv          = new StringBuilder();
     _timer        = new Stopwatch();
 }