您当前的位置: 首页 > 

unity工具人

暂无认证

  • 4浏览

    0关注

    205博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

一个声音管理类

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

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