예제 #1
0
        public void RemoveAVObject(string videoName)
        {
            AVObject aVObject = null;

            if (m_AVObjects.TryGetValue(videoName, out aVObject))
            {
                m_AVObjects.Remove(videoName);
                aVObject.Dispose();
            }
        }
예제 #2
0
        /// <summary>
        /// 添加AV播放
        /// </summary>
        /// <param name="gGraph">对应UGUI资源</param>
        /// <param name="videoName">路径</param>
        /// <param name="autoOpen">是否自动播放</param>
        /// <param name="autoStart">是否自动开始</param>
        /// <param name="volume">音量</param>
        /// <returns></returns>
        public AVObject AddAVObject(GGraph gGraph, string videoName, bool autoOpen, bool autoStart, bool loop, float volume)
        {
            AVObject aVObject = null;

            if (m_AVObjects.TryGetValue(videoName, out aVObject))
            {
                aVObject.Dispose();
            }
            else
            {
                aVObject = new AVObject();

                m_AVObjects.Add(videoName, aVObject);
            }

            aVObject.CreateAVObject(gGraph, videoName, autoOpen, autoStart, loop, volume);

            return(aVObject);
        }