123456789101112131415161718192021222324252627 |
- using UnityEngine;
- using System.Collections;
- using UnityEngine.UI;
- public class BtnScript : MonoBehaviour {
- public Button OkBtn;
- public Image img;
- public Text text;
- // Use this for initialization
- void Start () {
- OkBtn.onClick.AddListener (() => {
- Invoke("Onclick",5f);
- text.text = " ";
- img.color = new Color(255f,255f,255f,255f);
- });
- }
-
- // Update is called once per frame
- void Update () {
-
- }
- void Onclick(){
- Application.LoadLevel ("Scene/Main");
- }
- }
|