| 1234567891011121314151617181920212223242526272829 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- public class BLE9AxisHolder : MonoBehaviour
- {
- static BLE9AxisHolder ins;
- public static void Init()
- {
- if (ins) return;
- ins = new GameObject(typeof(BLE9AxisHolder).Name).AddComponent<BLE9AxisHolder>();
- DontDestroyOnLoad(ins);
- ins.gameObject.AddComponent<BluetoothAim>();
- ins.gameObject.AddComponent<AimHandler>();
- ins.gameObject.AddComponent<ShootCheck>();
- }
- void Awake()
- {
- SceneManager.sceneLoaded += (scene, mode) =>
- {
- if (scene.name.Equals("Start"))
- {
- PinBallUIManager.instance.ShowUI(new object[] { "BluetoothView" });
- }
- };
- }
- }
|