123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using UnityEngine;
- using UnityEngine.InputSystem;
- using UnityEngine.XR.Interaction.Toolkit;
- 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()
- {
- Transform tr = followGame.GetComponent<ActionBasedController>().modelParent;
- this.transform.position = tr.transform.position+ tr.transform.forward*0.1f;
- this.transform.eulerAngles = new Vector3(tr.transform.eulerAngles.x-24, tr.transform.eulerAngles.y, tr.transform.eulerAngles.z);
- this.gameObject.SetActive(followGame.activeSelf);
- }
- }
- }
|