SmartBowController.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. namespace WildAttack
  6. {
  7. public class SmartBowController : MonoBehaviour
  8. {
  9. public static SmartBowController Instance;
  10. void Start()
  11. {
  12. Instance = this;
  13. SimulateMouseController.ins?.RemoveOpenLocker("NotGame");
  14. CameraToLook.ins.onParseRotation += OnRotationUpdate;
  15. }
  16. void OnDestroy()
  17. {
  18. if (Instance == this) Instance = null;
  19. }
  20. public void OnRotationUpdate(Quaternion rotation)
  21. {
  22. if (SB_EventSystem.ins.simulateMouseIsAwaked) return;
  23. GameMananger.GetInstance().OnRotationUpdate(rotation);
  24. }
  25. public void OnShooting(float speed)
  26. {
  27. GameMananger.GetInstance().OnModuleShooting(speed);
  28. }
  29. public bool IsBluetoothModuleInited()
  30. {
  31. return BluetoothAim.ins && BluetoothAim.ins.status == BluetoothStatusEnum.ConnectSuccess;
  32. }
  33. }
  34. }