public void Choose(ViveController.TouchPad dir) { switch (dir) { case ViveController.TouchPad.Up: if (idx == 0) { idx = 1; _yesImage.color = _inactiveColor; _noImage.color = _activeColor; } else { idx = 0; _yesImage.color = _activeColor; _noImage.color = _inactiveColor; } break; case ViveController.TouchPad.Down: if (idx == 1) { idx = 0; _yesImage.color = _activeColor; _noImage.color = _inactiveColor; } else { idx = 1; _yesImage.color = _inactiveColor; _noImage.color = _activeColor; } break; } }
/// <summary> /// 질병 선택하기(고르는 단계) /// </summary> /// <param name="dir">방향</param> public void ChooseDisease(ViveController.TouchPad dir) { switch (dir) { case ViveController.TouchPad.Up: if (indexDisease == 0) { indexDisease = 2; } else if (indexDisease == 1) { indexDisease = 0; } else if (indexDisease % 2 == 0) { indexDisease--; } else { indexDisease++; } break; case ViveController.TouchPad.Down: if (indexDisease == 0) { indexDisease = 1; } else if (indexDisease == 2) { indexDisease = 0; } else if (indexDisease % 2 == 1) { indexDisease++; } else { indexDisease--; } break; case ViveController.TouchPad.Right: if (indexDisease == 0) { indexDisease = 1; } else if (indexDisease == 5) { indexDisease = 2; } else if (indexDisease == 6) { indexDisease = 0; } else { indexDisease += 2; } break; case ViveController.TouchPad.Left: if (indexDisease == 0) { indexDisease = 6; } else if (indexDisease == 1) { indexDisease = 0; } else if (indexDisease == 2) { indexDisease = 5; } else { indexDisease -= 2; } break; } SetColor(indexDisease); }