您当前的位置: 首页 >  unity工具人

一个声音管理类

unity工具人 发布时间:2022-03-15 17:59:45 ,浏览量:5

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             
关注
打赏
1688896170
查看更多评论
0.0799s