This commit is contained in:
YangHua 2023-09-10 17:05:36 +08:00
commit e212250578
4 changed files with 132 additions and 1 deletions

View File

@ -8,9 +8,10 @@ public class GameManager_Tools : MonoBehaviour
public GameObject target;
//public Button button;
public GameObject _content;
public List<Tool_objects_base> ;
//[HideInInspector]
public string toolsname;
public int = 0;
// Start is called before the first frame update
void Start()
{
@ -43,5 +44,30 @@ public class GameManager_Tools : MonoBehaviour
.GetComponent<Tools_object_UI>().UI_name = toolsname;
.GetComponent<Tools_object_UI>().change();
}
public void fenshu_check() {
for (int i = 0; i < .Count; i++)
{
for (int g = 0; g < tool_Objects_Base.Count; g++)
{
tool_Objects_Base[g] = [i];
+= 1;
}
}
}
public void ResToolsUI()
{
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b6896e079245ce74ba7705ffdea014cd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,86 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
public class Button_click_count : MonoBehaviour
{
public string[] ;
public string[] ;
public string[] ;
[SerializeField]
private UnityEvent events;
// Start is called before the first frame update
void Start()
{
GetComponent<Button>().onClick.AddListener(onclick);
}
// Update is called once per frame
void Update()
{
}
public void Fangfa() {
}
public void onclick() {
events?.Invoke();
GameObject[] gameObjects = Resources.FindObjectsOfTypeAll<GameObject>();
for (int i = 0; i < .Length; i++)
{
for (int g = 0; g < gameObjects.Length; g++)
{
if (gameObjects[g].name == [i])
{
gameObjects[g].SetActive(false);
}
}
}
for (int i = 0; i < .Length; i++)
{
for (int g = 0; g < gameObjects.Length; g++)
{
if (gameObjects[g].name == [i])
{
gameObjects[g].SetActive(true);
}
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 124dc3d5d4787d14c871df6fc691af5f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: