/// <summary>初始化元件</summary> private void InitComponent() { HeroMgr = GetComponent <HeroManager>(); EnemySpawnMgr = GetComponent <EnemySpawnManager>(); SoundMgr = GetComponent <SoundManager>(); //SoundMgr.SetVolume(0f); StatusMgr = GetComponent <StatusManager>(); gameObject.AddComponent <EffectManager>(); gameObject.AddComponent <SnarePools>(); gameObject.AddComponent <HUDManager>(); CoreTarget = MapMgr.TargetTs.gameObject.AddComponent <BaseCore>(); BaseHUD = UICanvas.GetComponent <HUD>(); m_UIPopupList.SetItems(new List <string> { "陷阱一", "陷阱二", "陷阱三", "陷阱四", "陷阱五", "陷阱六", "陷阱七", "陷阱八" }); }