123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using SC.InputSystem;
- using UnityEngine.UI;
- public class ControlHandShank : MonoBehaviour
- {
- bool isHandShank1Enable {
- get {
- if(InputSystem.Instant.HandShank) {
- return InputSystem.Instant.HandShank.OneHandShankOpen;
- }
- return false;
- }
- set {
- if(InputSystem.Instant.HandShank) {
- InputSystem.Instant.HandShank.OneHandShankOpen = value;
- }
- }
- }
- bool isHandShank2Enable {
- get {
- if(InputSystem.Instant.HandShank) {
- return InputSystem.Instant.HandShank.TwoHandShankOpen;
- }
- return false;
- }
- set {
- if(InputSystem.Instant.HandShank) {
- InputSystem.Instant.HandShank.TwoHandShankOpen = value;
- }
- }
- }
- public Text handShank1Text, handShank2Text;
- void Start() {
- //InputSystem.Instant.RegisterInputDevice(InputDeviceType.HandShank);
- //InputSystem.Instant.RegisterInputDevice(InputDeviceType.Head);
- //InputSystem.Instant.UnRegisterInputDevice(InputDeviceType.Gesture26DofHand);
- }
- public void SwitchHandShank1() {
- isHandShank1Enable = !isHandShank1Enable;
- if(! isHandShank1Enable) {
- handShank1Text.text = "Enable HandShank1";
- } else {
- handShank1Text.text = "Disable HandShank1";
- }
- }
- public void SwitchHandShank2() {
- isHandShank2Enable = !isHandShank2Enable;
- if(! isHandShank2Enable) {
- handShank2Text.text = "Enable HandShank2";
- } else {
- handShank2Text.text = "Disable HandShank2";
- }
- }
- }
|