unity学习——单例模式

顾名思义单例模式表达的是只能建立一个实例。一般用在须要统一管理某项实物的时候用到。单例模式咱们是经过将构造函数设为私有来实现。web using System.Collections; using System.Collections.Generic; using UnityEngine; public class SounderManager {//不能继承MonoBehaviour
相关文章
相关标签/搜索