void Awake() { if (instance) { Destroy(gameObject); } instance = this; PuzzletConnection.RegisterReceiver(this); DontDestroyOnLoad(gameObject); DontDestroyOnLoad(rootAnim); //set texts to appropriate for device #if UNITY_STANDALONE || UNITY_EDITOR string deleteStr = "Bluetooth"; #else string deleteStr = "USB"; #endif for (int a = 0; a < texts.Length; ++a) { for (int b = 0; b < texts[a].transform.childCount; ++b) { Transform child = texts[a].transform.GetChild(b); if (child.name == deleteStr) { Destroy(child.gameObject); } } } }
void Start() { PuzzletManager.RegisterReceiver(this); PuzzletConnection.StartScanning(); musicSpeed = 4; lowNotes = true; mediumNotes = true; highNotes = true; }
void OnMouseDown() { PuzzletConnection.StopScanning(); }