12345678910111213141516171819202122232425262728 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class MapControl : MonoBehaviour
- {
- public TestMapShow minMap;
- public TestMapShow maxMap;
- public Text text;
- bool state = false;
- public void OnClick()
- {
- if(state)
- {
- maxMap.gameObject.SetActive(true);
- minMap.gameObject.SetActive(false);
- text.text = "小地图";
- }
- else
- {
- maxMap.gameObject.SetActive(false);
- minMap.gameObject.SetActive(true);
- text.text = "全局地图";
- }
- state = !state;
- }
- }
|