public override void Update(GameTime gameTime)
 {
     if (index == 0)
     {
         manager.Update(gameTime.ElapsedGameTime);
         if (nextJoyConRefreshList < gameTime.TotalGameTime)
         {
             manager.RefreshJoyConList();
             nextJoyConRefreshList = gameTime.TotalGameTime.Add(new TimeSpan(0, 0, 1));
         }
     }
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            SetupLog4Net();
            var manager = new JoyconManager();

            manager.ConnectJoyCons();
            manager.Start();

            var firstJoyCon = manager.ConnectedJoyCons.FirstOrDefault();

            while (true)
            {
                manager.Update();
                Thread.Sleep(500);
                foreach (Button buttonType in Enum.GetValues(typeof(Button)))
                {
                    var isPressed = firstJoyCon.GetButton(buttonType);
                    Console.WriteLine(buttonType + (isPressed ? "isPressed" : "notPressed"));
                }
            }

            manager.DisconnectJoyCons();
        }
        private void timerUpdate_Tick(object sender, EventArgs e)
        {
            joyconManager.Update();

            UpdateInfo();
        }
Beispiel #4
0
 private void timerUpdate_Tick(object sender, EventArgs e)
 {
     joyconManager.Update();
     label1.Text = joyconManager.j[0].GetGyro().ToString();
 }
Beispiel #5
0
 private void timerUpdate_Tick(object sender, EventArgs e)
 {
     manager.Update();
     InfoRefresh();
 }