ModelGCBase.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. namespace SC.XR.Unity.Module_InputSystem.InputDeviceGC {
  6. public abstract class ModelGCBase : ModelBase {
  7. public InputDeviceGCPartUI inputDeviceGCPartUI {
  8. get {
  9. return inputDevicePartUIBase as InputDeviceGCPartUI;
  10. }
  11. }
  12. public Transform StartPoint;
  13. public HandAnimationBase handAnimation;
  14. public GCPower gcPower;
  15. [Header("3DofBias")]
  16. public Vector3 _modelPositionDeltaWithDevice = new Vector3(0, 0, 0);
  17. public override Transform HitStartPoint { get => StartPoint; }
  18. public override void OnSCAwake() {
  19. base.OnSCAwake();
  20. AddModule(handAnimation);
  21. AddModule(gcPower);
  22. }
  23. public override void OnSCStart() {
  24. base.OnSCStart();
  25. if (handAnimation != null) {
  26. handAnimation.ModuleStart();
  27. }
  28. if (gcPower != null) {
  29. gcPower.ModuleStart();
  30. }
  31. }
  32. public override void OnSCLateUpdate() {
  33. base.OnSCLateUpdate();
  34. SetTpPosition();
  35. SetHandleKeysColor();
  36. }
  37. public virtual void SetTpPosition() {
  38. }
  39. public virtual void SetHandleKeysColor() {
  40. }
  41. }
  42. }