unity學習——單例模式

顧名思義單例模式表達的是隻能建立一個實例。一般用在須要統一管理某項實物的時候用到。單例模式咱們是經過將構造函數設爲私有來實現。web using System.Collections; using System.Collections.Generic; using UnityEngine; public class SounderManager {//不能繼承MonoBehaviour
相關文章
相關標籤/搜索