ModelK07.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace SC.XR.Unity.Module_InputSystem.InputDeviceGC.BT3Dof {
  5. public class ModelK07 : ModelBT3DofBase {
  6. public MeshRenderer volumeDown;
  7. public MeshRenderer volumeUp;
  8. public MeshRenderer tpKey;
  9. public override void SetHandleKeysColor() {
  10. base.SetHandleKeysColor();
  11. if (releaseMaterial == null || pressMaterial == null) {
  12. return;
  13. }
  14. foreach (var item in inputDeviceBT3DofPartUI.inputDeviceBT3DofPart.inputDataBT3Dof.inputKeys.inputKeyDic) {
  15. if (item.Key == InputKeyCode.Tp) {
  16. tpKey.material = releaseMaterial;
  17. if (item.Value == InputKeyState.DOWN || item.Value == InputKeyState.LONG) {
  18. tpKey.material = pressMaterial;
  19. }
  20. } else if (item.Key == InputKeyCode.VolumeDown) {
  21. volumeDown.material = releaseMaterial;
  22. if (item.Value == InputKeyState.DOWN || item.Value == InputKeyState.LONG) {
  23. volumeDown.material = pressMaterial;
  24. }
  25. } else if (item.Key == InputKeyCode.VolumeUp) {
  26. volumeUp.material = releaseMaterial;
  27. if (item.Value == InputKeyState.DOWN || item.Value == InputKeyState.LONG) {
  28. volumeUp.material = pressMaterial;
  29. }
  30. }
  31. }
  32. }
  33. }
  34. }