You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1017 B
41 lines
1017 B
4 years ago
|
using AX.MessageSystem;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using System;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
public class FourthGPanel : MonoBehaviour {
|
||
|
public ButtonRecordByAC CloseButton;
|
||
|
// Use this for initialization
|
||
|
void Awake () {
|
||
|
MessageDispatcher.AddListener("OpenFourthG", ShowOrHidePanel);
|
||
|
gameObject.SetActive(false);
|
||
|
}
|
||
|
private void OnDestroy()
|
||
|
{
|
||
|
MessageDispatcher.RemoveListener("OpenFourthG", ShowOrHidePanel);
|
||
|
}
|
||
|
void Start()
|
||
|
{
|
||
|
CloseButton.OutInterFaceButton = closeClick;
|
||
|
}
|
||
|
|
||
|
private void closeClick()
|
||
|
{
|
||
|
//FindObjectOfType<FourthGToggle>().GetComponent<Toggle>().isOn = false;
|
||
|
GameObject.Find("4GPictureToggle").GetComponent<Toggle>().isOn = false;
|
||
|
gameObject.SetActive(false);
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update () {
|
||
|
|
||
|
}
|
||
|
void ShowOrHidePanel(IMessage obj)
|
||
|
{
|
||
|
var isOn = (bool)obj.Data;
|
||
|
gameObject.SetActive(isOn);
|
||
|
}
|
||
|
}
|