Commit 2870cd0a authored by 16이진형's avatar 16이진형

알람 기본 기능

parent 8a24918b
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AlertManager : MonoBehaviour
{
[SerializeField]
GameObject alertObject;
[SerializeField]
Button okButton;
[SerializeField]
Button cancelButton;
[SerializeField]
Text alertText;
// Start is called before the first frame update
void Start()
{
Close();
Alert("test");
}
// Update is called once per frame
void Update()
{
}
public void Alert(string text)
{
Open();
alertText.text = text;
okButton.onClick.AddListener(Close);
cancelButton.onClick.AddListener(Close);
}
public void Open()
{
alertObject.SetActive(true);
}
public void Close()
{
okButton.onClick.RemoveAllListeners();
cancelButton.onClick.RemoveAllListeners();
alertObject.SetActive(false);
}
}
fileFormatVersion: 2
guid: fe82d3fd30784eb47b1817cc46e1e205
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 873b374412d1e9f40aa3636ed9e2bdf8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment