예제 #1
0
 void CheckController()
 {
     if (!isController)
     {
         joystick = InputManager.ActiveDevice;
         if (joystick != null && joystick.Name != "NullInputDevice" && joystick.Name != "Unknown Device")
         {
             isController = true;
             selected     = item[index];
             selected.Select();
             Cursor.visible    = false;
             raycaster.enabled = false;
         }
     }
     else
     {
         joystick = InputManager.ActiveDevice;
         if (joystick == null || joystick.Name == "NullInputDevice" || joystick.Name == "Unknown Device")
         {
             isController = false;
             selected.Diselect();
             Cursor.visible    = true;
             raycaster.enabled = true;
         }
     }
 }
예제 #2
0
 private void OnEnable()
 {
     if (isController)
     {
         index    = 0;
         selected = item[index];
         selected.Select();
     }
     else
     {
         Cursor.visible = true;
     }
 }
예제 #3
0
 void SelectItem()
 {
     selected.Diselect();
     selected = item[index];
     selected.Select();
 }