12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using UnityEngine;
- using UnityEngine.InputSystem;
- namespace SC.XR.Unity.Module_InputSystem.InputDeviceGC.KS {
- public class InputDeviceKSPart : InputDeviceGCPart {
- public InputDeviceKS inputDeviceKS {
- get { return Transition<InputDeviceKS>(inputDeviceBase); }
- }
- public InputDeviceKSPartUI inputDeviceKSPartUI {
- get { return Transition<InputDeviceKSPartUI>(inputDevicePartUIBase); }
- }
- public KSDetector bT3DofDetector {
- get { return Transition<KSDetector>(detectorBase); }
- }
- public InputDataKS inputDataKS {get; set;}
- public InputDataGetKS inputDataGetKS { get; set; }
- public InputDeviceKSPartStatus inputDevicePartStatusKS { get; set; }
- public InputDevicePartDispatchEventKS inputDevicePartDispatchEventKS { get; set; }
- protected override void ModuleCreater() {
- inputDataBase = inputDataGC = inputDataKS = new InputDataKS(this);
- inputDataGetBase = inputDataGetGC = inputDataGetKS = new InputDataGetKS(this);
- inputDevicePartStatusBase = inputDevicePartStatusGC = inputDevicePartStatusKS = new InputDeviceKSPartStatus(this);
- inputDevicePartDispatchEventBase = inputDevicePartDispatchEventGC = inputDevicePartDispatchEventKS = new InputDevicePartDispatchEventKS(this);
- }
- [SerializeField]
- public InputActionProperty m_PositionInput;
- [SerializeField]
- public InputActionProperty m_RotationInput;
- [SerializeField]
- public InputActionProperty triggerInput;
- public GameObject followGame;
- private void Update()
- {
- #if !UNITY_EDITOR
- this.transform.position = followGame.transform.position+ followGame.transform.forward*0.1f;
- this.transform.eulerAngles = new Vector3(followGame.transform.eulerAngles.x-24, followGame.transform.eulerAngles.y, followGame.transform.eulerAngles.z);
-
- this.gameObject.SetActive(followGame.activeSelf);
- #endif
- }
- }
- }
|