HandShankKeyEvent.cs 681 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using ShadowKit.Action;
  5. using SC.InputSystem.InputDeviceHandShank;
  6. using SC.InputSystem;
  7. public class HandShankKeyEvent : HandShankKeyHandlers {
  8. public override void OnFunctionKeyDown(InputDeviceHandShankPart part, SCPointEventData eventData) {
  9. base.OnFunctionKeyDown(part, eventData);
  10. GetComponent<MeshRenderer>().material.color = Color.blue;
  11. }
  12. public override void OnFunctionKeyUp(InputDeviceHandShankPart part, SCPointEventData eventData) {
  13. base.OnFunctionKeyUp(part, eventData);
  14. GetComponent<MeshRenderer>().material.color = Color.gray;
  15. }
  16. }