Esempio n. 1
0
        private bool _playSound(AudioClip audioClip)
        {
            AudioSource source = mSourcePool.Get();

            source.clip = audioClip;
            source.Play();
            source.volume = mSoundVolume;
            //lateupdate检测到停止播放则回收
            mPlayingSources.Add(source);
            return(true);
        }
Esempio n. 2
0
 public static List <bool> GetListBool()
 {
     checkInit();
     return(sPoolLB.Get());
 }
Esempio n. 3
0
 public static AsbInfo GetAsbInfo()
 {
     checkInit();
     return(sPoolAsbInfo.Get());
 }
Esempio n. 4
0
 public static List <string> GetListString()
 {
     checkInit();
     return(sPoolLS.Get());
 }
Esempio n. 5
0
 public static List <float> GetListFloat()
 {
     checkInit();
     return(sPoolLF.Get());
 }
Esempio n. 6
0
        //public static T GetObjPool<T>() where T : class, new()
        //{
        //    T pool = null;
        //    string name = typeof(T).ToString();
        //    System.Object obj;
        //    if (sDict.TryGetValue(name, out obj))
        //    {
        //        pool = obj as T;
        //    }
        //    if (null == pool)
        //    {
        //        LogFile.Error("no ObjPool with:" + name);
        //    }
        //    return pool;
        //}

        public static List <int> GetListInt()
        {
            checkInit();
            return(sPoolLI.Get());
        }
 Toggle getToggle()
 {
     return(mPool.Get());
 }
Esempio n. 8
0
 private ScrollItem getItem()
 {
     return(mItemPool.Get());
 }