public AudioMateClipCollection(string collectionName, AudioMateController controller) { _controller = controller; Name = collectionName; ResetUnplayedClips(); Init(); }
public void Init(AudioMateController controller) { if ((UnityEngine.Object)controller == (UnityEngine.Object)null) { SuperController.LogError($"AudioMate.{nameof(AudioMateCollectionManager)}.{nameof(Init)}: Controller is null."); return; } _controller = controller; if (isInitialized) { Log("Collection manager is already initialized."); return; } Log("### Init ###"); if ((UnityEngine.Object)_controller.ui == (UnityEngine.Object)null) { SuperController.LogError($"AudioMate.{nameof(AudioMateCollectionManager)}.{nameof(Init)}: UI is not initialized."); return; } _ui = _controller.ui; CollectionsJSON = _controller.CollectionsJSON; CollectionsJSON.setCallbackFunction = SelectActiveCollection; SelectActiveCollection(); isInitialized = true; }
private void SetDefaults() { if (ReceiverAtom == null) { ReceiverAtom = _controller.containingAtom.uid; } if (ReceiverNode == null) { ReceiverNode = AudioMateController.GuessInitialReceivingNode(_controller.containingAtom); } SyncAudioReceiver(); }
public AudioMateClipCollection(string collectionName, IEnumerable <AudioMateClip> clips, AudioMateController controller) { try { _controller = controller; Name = collectionName; _clips.AddRange(clips); ResetUnplayedClips(); Init(); } catch (Exception e) { SuperController.LogError($"AudioMate.{nameof(AudioMateClipCollection)}.{nameof(AudioMateClipCollection)} (IEnumerable): {e}"); } }
public AudioMateClipCollection(JSONNode jn, AudioMateController controller) { if (jn == null || jn.AsObject == null) { return; } try { _controller = controller; Parse(jn); } catch (Exception e) { SuperController.LogError($"AudioMate.{nameof(AudioMateClipCollection)}.{nameof(AudioMateClipCollection)} (JSON): {e}"); } }
public AudioMateClipCollection(AudioMateController controller) { _controller = controller; ResetUnplayedClips(); Init(); }
public TriggerManager(AudioMateController controller) { _controller = controller; Init(); }