E_ElecCompetition/Electrical_inspectionCompet.../Assets/Script/Tool objects/GameManager_Tools.cs

113 lines
2.9 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class GameManager_Tools : MonoBehaviour
{
public List<Tools_object_UI> tool_Objects_UI = new List<Tools_object_UI>();
public GameObject target;
//public Button button;
public GameObject _content;
public List<Tools_object_UI> ;
//[HideInInspector]
public string toolsname;
private int = 0;
// Start is called before the first frame update
void Start()
{
// button.onClick.AddListener(change_toolsbutton);
}
// Update is called once per frame
void Update()
{
}
public void Remove_tool_Objects_Base(GameObject gameObject)
{
tool_Objects_UI.Remove(gameObject.GetComponent<Tools_object_UI>());
}
public void change_toolsbutton() {
if (_content == null)
{
_content = GameObject.Find("Don'Destory").GetComponent<HoldToolsCheck>().;
}
var load = Resources.Load("Prefab/묏야객큐");
GameObject = Instantiate(load) as GameObject;
.transform.SetParent(_content.transform);
tool_Objects_UI.Add(.GetComponent<Tools_object_UI>());
.transform.localScale = new Vector3(1, 1, 1);
.transform.localPosition = new Vector3(0, 0, 0);
.transform.localEulerAngles = new Vector3(0, 0, 0);
// 묏야객큐.GetComponent<Tools_object_UI>().sprite_name = toolsname;
.GetComponent<Tools_object_UI>().targetobject = target;
target = null;
// Debug.Log(묏야객큐.GetComponent<Tools_object_UI>().sprite_name);
.GetComponent<Tools_object_UI>().UI_name = toolsname;
.GetComponent<Tools_object_UI>().change();
}
public void Reload() {
}
public void fenshu_check() {
for (int i = 0; i < .Count; i++)
{
for (int g = 0; g < tool_Objects_UI.Count; g++)
{
if (tool_Objects_UI[g] = [i])
{
+= 1;
}
}
}
for (int i = 0; i < tool_Objects_UI.Count; i++)
{
GameObject.Find("Don'Destory").GetComponent<HoldToolsCheck>()..Add(tool_Objects_UI[i].UI_name);
}
if (GameObject.Find("Don'Destory").GetComponent<HoldToolsCheck>(). == false)
{
GameObject.Find("Don'Destory").GetComponent<HoldToolsCheck>(). = ;
GameObject.Find("Don'Destory").GetComponent<HoldToolsCheck>(). = true;
}
}
public void ResToolsUI()
{
}
}