using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.SceneManagement;
//声音对象池
public class AudioObjectPool
{
//要生成的对象池预设
private GameObject prefab;
//对象池列表
private List pool;
//构造函数
public AudioObjectPool(GameObject prefab, int initialSize)
{
this.prefab = prefab;
this.pool = new List();
for (int i = 0; i {
StopAllCoroutines();
for (int i = 0; i
关注
打赏
一个声音管理类
立即登录/注册


微信扫码登录