38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
public class GameManager_Tools : MonoBehaviour
|
|
{
|
|
public List<Tool_objects_base> tool_Objects_Base = new List<Tool_objects_base>();
|
|
//public Button button;
|
|
public GameObject 묏야충겼_content;
|
|
//[HideInInspector]
|
|
public string toolsname;
|
|
|
|
// 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 change_toolsbutton() {
|
|
|
|
var load = Resources.Load("Prefab/묏야객큐");
|
|
GameObject 묏야객큐 = Instantiate(load) as GameObject;
|
|
묏야객큐.transform.SetParent(묏야충겼_content.transform);
|
|
묏야객큐.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>().UI_name = toolsname;
|
|
묏야객큐.GetComponent<Tools_object_UI>().change();
|
|
|
|
}
|
|
}
|