private void FreeController(ObjectAudioList audioList) { if (audioList.GO == null) { AudioListPool.ReleaseObject(audioList); } }
private RuntimeInfo PreparePlay(GameObject controllingObject, InAudioNode audioNode, InPlayer player) { ObjectAudioList tupleList = GetValue(GOAudioNodes, controllingObject); RuntimeInfo runtimeInfo = new RuntimeInfo(); tupleList.InfoList.Add(runtimeInfo); runtimeInfo.Node = audioNode; runtimeInfo.Player = player; runtimeInfo.PlacedIn = tupleList; return(runtimeInfo); }
private void Play(GameObject controllingObject, InAudioNode audioNode, InPlayer player, float fade, LeanTweenType fadeType) { ObjectAudioList tupleList = GetValue(GOAudioNodes, controllingObject); RuntimeInfo runtimeInfo = runtimeInfoPool.GetObject(); tupleList.InfoList.Add(runtimeInfo); runtimeInfo.Node = audioNode; runtimeInfo.Player = player; runtimeInfo.ListIndex = tupleList.InfoList.Count - 1; runtimeInfo.PlacedIn = tupleList; player._internalPlay(audioNode, controllingObject, runtimeInfo, fade, fadeType); }