SmartBowController.cs 987 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. GameMananger.GetInstance().OnRotationUpdate(rotation);
  23. }
  24. public void OnShooting(float speed)
  25. {
  26. GameMananger.GetInstance().OnShooting(speed);
  27. }
  28. public bool IsBluetoothModuleInited()
  29. {
  30. return BluetoothAim.ins && BluetoothAim.ins.status == BluetoothStatusEnum.ConnectSuccess;
  31. }
  32. }
  33. }