ShanxiKnowledgeBase/SXElectricityInformationAcq.../Assets/Scripts/HQB/ToolRoomToolsContainer.cs

41 lines
935 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using MotionFramework;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ToolRoomToolsContainer : MonoBehaviour//HQB挂载在所有工具的根部用于初始化工具是否显示
{
public static ToolRoomToolsContainer instance;
private Dictionary<string, List<GameObject>> _toolsNames;
ToolRoomToolsContainer() {
instance = this;
}
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnEnable()
{
if (instance != null)
{
_toolsNames = MotionEngine.GetModule<ToolsPackManager>().GetToolsPack();
foreach (var item in _toolsNames)
{
foreach (var item1 in item.Value)
{
item1.SetActive(false);
}
}
}
}
}