Exemplo n.º 1
0
    public static byte[] LoadTextWithBytes(string path)
    {
        TextAsset textAsset = AssetTrackMgr.GetAsset <TextAsset>(path);

        if (null != textAsset)
        {
            return(textAsset.bytes);
        }
        return(null);
    }
Exemplo n.º 2
0
    public static string LoadTextWithString(string path)
    {
        TextAsset textAsset = AssetTrackMgr.GetAsset <TextAsset>(path);

        if (null != textAsset)
        {
            return(textAsset.text);
        }
        return(null);
    }
Exemplo n.º 3
0
    /// <summary>
    /// 播放世界音效
    /// </summary>
    public static void PlayWorldSound(GameObject attachTarget, string audioName, bool isLoop = false, float speed = 1)
    {
        var audioClip = AssetTrackMgr.GetAsset <AudioClip>(audioName);

        AudioManager.Instance.PlayWorldSound(attachTarget, audioClip, isLoop, speed);
    }
Exemplo n.º 4
0
    /// <summary>
    /// 播放多通道音效
    /// </summary>
    public static void PlayMultipleSound(string audioName, bool isLoop = false, float speed = 1)
    {
        var audioClip = AssetTrackMgr.GetAsset <AudioClip>(audioName);

        AudioManager.Instance.PlayMultipleSound(audioClip, isLoop, speed);
    }
Exemplo n.º 5
0
    /// <summary>
    /// 播放背景音乐
    /// </summary>
    public static void PlayBackgroundMusic(string audioName, bool isLoop = true, float speed = 1)
    {
        var audioClip = AssetTrackMgr.GetAsset <AudioClip>(audioName);

        AudioManager.Instance.PlayBackgroundMusic(audioClip, isLoop, speed);
    }
Exemplo n.º 6
0
 public static UnityEngine.Object GetAsset(string path, Type type)
 {
     return(AssetTrackMgr.GetAsset(path, type));
 }
Exemplo n.º 7
0
 public static void ReleaseAsset(string path, UnityEngine.Object obj)
 {
     AssetTrackMgr.ReleaseAsset(path, obj);
 }
Exemplo n.º 8
0
 public static void ReleaseGameObject(string path, GameObject gameObject)
 {
     AssetTrackMgr.ReleaseGameObject(path, gameObject);
 }
Exemplo n.º 9
0
 public static void DiscardGameObject(string path, GameObject gameObject)
 {
     AssetTrackMgr.DiscardGameObject(path, gameObject);
 }
Exemplo n.º 10
0
 public static GameObject GetGameObject(string path, Transform parent)
 {
     return(AssetTrackMgr.GetGameObject(path, parent));
 }
Exemplo n.º 11
0
 public static void SetDisposeInterval(string group, int disposeTimeInterval)
 {
     AssetTrackMgr.SetDisposeInterval(group, disposeTimeInterval);
 }
Exemplo n.º 12
0
 public static void SetCapcitySize(string group, int capcity)
 {
     AssetTrackMgr.SetCapcitySize(group, capcity);
 }
Exemplo n.º 13
0
 public static GameObject InstantiatePrefab(string path, Transform parent)
 {
     return(AssetTrackMgr.GetGameObject(path, parent));
 }
Exemplo n.º 14
0
    /// <summary>
    /// 停止播放指定的多通道音效
    /// </summary>
    public static void StopMultipleSound(string audioName)
    {
        var audioClip = AssetTrackMgr.GetAsset <AudioClip>(audioName);

        AudioManager.Instance.StopMultipleSound(audioClip);
    }