Merge branch 'master' of http://119.45.94.212:1280/zhuyayu/E_ElecCompetition
This commit is contained in:
commit
e212250578
|
@ -8,9 +8,10 @@ public class GameManager_Tools : MonoBehaviour
|
||||||
public GameObject target;
|
public GameObject target;
|
||||||
//public Button button;
|
//public Button button;
|
||||||
public GameObject 묏야충겼_content;
|
public GameObject 묏야충겼_content;
|
||||||
|
public List<Tool_objects_base> 攣횅묏야;
|
||||||
//[HideInInspector]
|
//[HideInInspector]
|
||||||
public string toolsname;
|
public string toolsname;
|
||||||
|
public int 묏야朞嶝돤롸 = 0;
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
@ -43,5 +44,30 @@ public class GameManager_Tools : MonoBehaviour
|
||||||
묏야객큐.GetComponent<Tools_object_UI>().UI_name = toolsname;
|
묏야객큐.GetComponent<Tools_object_UI>().UI_name = toolsname;
|
||||||
묏야객큐.GetComponent<Tools_object_UI>().change();
|
묏야객큐.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()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b6896e079245ce74ba7705ffdea014cd
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 124dc3d5d4787d14c871df6fc691af5f
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue