private bool _playSound(AudioClip audioClip) { AudioSource source = mSourcePool.Get(); source.clip = audioClip; source.Play(); source.volume = mSoundVolume; //lateupdate检测到停止播放则回收 mPlayingSources.Add(source); return(true); }
public static List <bool> GetListBool() { checkInit(); return(sPoolLB.Get()); }
public static AsbInfo GetAsbInfo() { checkInit(); return(sPoolAsbInfo.Get()); }
public static List <string> GetListString() { checkInit(); return(sPoolLS.Get()); }
public static List <float> GetListFloat() { checkInit(); return(sPoolLF.Get()); }
//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()); }
private ScrollItem getItem() { return(mItemPool.Get()); }