public void GetPlayers(GameObject go, IList <InPlayer> copyTo) { ObjectAudioList infoList; GOAudioNodes.TryGetValue(go.GetInstanceID(), out infoList); if (infoList != null) { var list = infoList.InfoList; for (int i = 0; i < list.Count && i < copyTo.Count; i++) { copyTo[i] = infoList.InfoList[i].Player; } } }
public void StopAll(GameObject controllingObject) { List <RuntimeTuple> valueTupleList; GOAudioNodes.TryGetValue(controllingObject, out valueTupleList); if (valueTupleList != null) { for (int i = 0; i < valueTupleList.Count; ++i) { RuntimePlayer player = valueTupleList[i].Player; player.Stop(); valueTupleList.SwapRemoveAt(i); } } }
public void StopByNode(GameObject controllingObject, AudioNode nodeToStop) { List <RuntimeTuple> valueTupleList; GOAudioNodes.TryGetValue(controllingObject, out valueTupleList); if (valueTupleList != null) { for (int i = 0; i < valueTupleList.Count; ++i) { if (valueTupleList[i].Node == nodeToStop) { valueTupleList.SwapRemoveAt(i); } } } }
public void Break(GameObject controllingObject, AudioNode toBreak) { List <RuntimeTuple> valueTupleList; GOAudioNodes.TryGetValue(controllingObject, out valueTupleList); if (valueTupleList != null) { for (int i = 0; i < valueTupleList.Count; ++i) { if (valueTupleList[i].Node == toBreak) { valueTupleList[i].Player.Break(); } } } }
public void SetVolumeForGameObject(GameObject controllingObject, float newVolume) { ObjectAudioList outInfoList; GOAudioNodes.TryGetValue(controllingObject.GetInstanceID(), out outInfoList); if (outInfoList != null) { List <RuntimeInfo> infoList = outInfoList.InfoList; int count = infoList.Count; for (int i = 0; i < count; ++i) { var player = infoList[infoList.Count - 1].Player; player.Volume = newVolume; } } }
public void Break(GameObject controllingObject, InAudioNode toBreak) { ObjectAudioList infoList; GOAudioNodes.TryGetValue(controllingObject.GetInstanceID(), out infoList); if (infoList != null) { var list = infoList.InfoList; for (int i = 0; i < list.Count; ++i) { if (list[i].Node == toBreak) { list[i].Player.Break(); } } } }
public void StopByNode(GameObject controllingObject, InAudioNode nodeToStop, float fadeOutTime = 0.0f, LeanTweenType tweenType = LeanTweenType.easeOutCubic) { ObjectAudioList infoList; GOAudioNodes.TryGetValue(controllingObject.GetInstanceID(), out infoList); if (infoList != null) { var list = infoList.InfoList; for (int i = 0; i < list.Count; ++i) { if (list[i].Node == nodeToStop) { list[i].Player.Stop(fadeOutTime, tweenType); } } } }
public InPlayer[] GetPlayers(GameObject go) { ObjectAudioList infoList; GOAudioNodes.TryGetValue(go.GetInstanceID(), out infoList); if (infoList != null) { InPlayer[] players = new InPlayer[infoList.InfoList.Count]; var list = infoList.InfoList; for (int i = 0; i < list.Count; i++) { players[i] = infoList.InfoList[i].Player; } return(players); } return(null); }
public void StopAll(GameObject controllingObject, float fadeOutTime, LeanTweenType type) { ObjectAudioList infoList; GOAudioNodes.TryGetValue(controllingObject.GetInstanceID(), out infoList); if (infoList != null) { var list = infoList.InfoList; for (int i = 0; i < list.Count; ++i) { if (fadeOutTime > 0) { list[i].Player.Stop(fadeOutTime, type); } else { list[i].Player.Stop(); } } } }