| 123456789101112131415161718192021222324 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class TargetView : MonoBehaviour
- {
- void Start()
- {
- Show(false);
- this.transform.Find("Button").GetComponent<Button>().onClick.AddListener(delegate() {
- Show(true);
- });
- this.transform.Find("RawImage").GetComponent<Button>().onClick.AddListener(delegate() {
- Show(false);
- });
- }
- void Show(bool value)
- {
- this.GetComponent<RawImage>().enabled = value;
- this.transform.Find("RawImage").gameObject.SetActive(value);
- }
- }
|