示例#1
0
 public void Dingdian()
 {
     MainScene.Instance.scene = "DDYB";
     MainScene.Instance.dingdian.SetActive(true);
     TTUIPage.ClosePage(this);
     TTUIPage.ShowPage <UISingleBtn>();
     TTUIPage.ShowPage <UITip>();
     UITip.Instance.SetTip("点击帮助按钮,查看操作说明,控制人物进入实验室。");
     UISingleBtn.Instance.transform.Find("HelpBtn").gameObject.SetActive(true);
 }
示例#2
0
        public override void Awake(GameObject go)
        {
            Instance = this;
            index    = 0;
            transform.Find("EndBtn").GetComponent <Button>().onClick.AddListener(() => {
                if (index == 3)
                {
                    UIManager.Instance.AddStep();
                }
                TTUIPage.ClosePage(this);
            });

            //transform.Find("LastBtn").GetComponent<Button>().onClick.AddListener(() => Last());
            //transform.Find("NextBtn").GetComponent<Button>().onClick.AddListener(() => Next());
        }
示例#3
0
 public override void Awake(GameObject go)
 {
     transform.Find("ShowBtn").GetComponent <Button>().onClick.AddListener(() => {
         transform.Find("grid").gameObject.SetActive(true);
         TTUIPage.ClosePage <UITip>();
     });
     buttons.Add(transform.Find("grid/Dianyaolu").GetComponent <Button>());
     buttons.Add(transform.Find("grid/Meikuai").GetComponent <Button>());
     buttons.Add(transform.Find("grid/Songxiang").GetComponent <Button>());
     buttons.Add(transform.Find("grid/Muchai").GetComponent <Button>());
     buttons.Add(transform.Find("grid/Haiyan").GetComponent <Button>());
     buttons.Add(transform.Find("grid/Matizhu").GetComponent <Button>());
     buttons.Add(transform.Find("grid/Pengban").GetComponent <Button>());
     buttons.Add(transform.Find("grid/Peipin").GetComponent <Button>());
     buttons.Add(transform.Find("grid/Xiabo").GetComponent <Button>());
     transform.Find("grid/Dianyaolu").GetComponent <Button>().onClick.AddListener(() => ShowInfo(transform.Find("grid/Dianyaolu").GetComponent <Button>()));
     transform.Find("grid/Meikuai").GetComponent <Button>().onClick.AddListener(() => ShowInfo(transform.Find("grid/Meikuai").GetComponent <Button>()));
     transform.Find("grid/Songxiang").GetComponent <Button>().onClick.AddListener(() => ShowInfo(transform.Find("grid/Songxiang").GetComponent <Button>()));
     transform.Find("grid/Muchai").GetComponent <Button>().onClick.AddListener(() => ShowInfo(transform.Find("grid/Muchai").GetComponent <Button>()));
     transform.Find("grid/Haiyan").GetComponent <Button>().onClick.AddListener(() => ShowInfo(transform.Find("grid/Haiyan").GetComponent <Button>()));
     transform.Find("grid/Matizhu").GetComponent <Button>().onClick.AddListener(() => ShowInfo(transform.Find("grid/Matizhu").GetComponent <Button>()));
     transform.Find("grid/Pengban").GetComponent <Button>().onClick.AddListener(() => ShowInfo(transform.Find("grid/Pengban").GetComponent <Button>()));
     transform.Find("grid/Peipin").GetComponent <Button>().onClick.AddListener(() => ShowInfo(transform.Find("grid/Peipin").GetComponent <Button>()));
     transform.Find("grid/Xiabo").GetComponent <Button>().onClick.AddListener(() => ShowInfo(transform.Find("grid/Xiabo").GetComponent <Button>()));
     transform.Find("grid").gameObject.SetActive(false);
     if (SceneManager.GetActiveScene().name == "CTYB")
     {
         transform.Find("grid/Muchai").gameObject.SetActive(false);
         transform.Find("grid/Muchai").GetComponent <Button>().interactable = false;
         transform.Find("grid/Haiyan").gameObject.SetActive(false);
         transform.Find("grid/Haiyan").GetComponent <Button>().interactable = false;
         transform.Find("grid/Xiabo").gameObject.SetActive(false);
         transform.Find("grid/Xiabo").GetComponent <Button>().interactable = false;
     }
     else if (SceneManager.GetActiveScene().name == "CDYB")
     {
         transform.Find("grid/Meikuai").gameObject.SetActive(false);
         transform.Find("grid/Meikuai").GetComponent <Button>().interactable = false;
         transform.Find("grid/Songxiang").gameObject.SetActive(false);
         transform.Find("grid/Songxiang").GetComponent <Button>().interactable = false;
         transform.Find("grid/Haiyan").gameObject.SetActive(false);
         transform.Find("grid/Haiyan").GetComponent <Button>().interactable = false;
         transform.Find("grid/Xiabo").gameObject.SetActive(false);
         transform.Find("grid/Xiabo").GetComponent <Button>().interactable = false;
     }
     else if (SceneManager.GetActiveScene().name == "YSYB")
     {
         transform.Find("grid/Meikuai").gameObject.SetActive(false);
         transform.Find("grid/Meikuai").GetComponent <Button>().interactable = false;
         transform.Find("grid/Songxiang").gameObject.SetActive(false);
         transform.Find("grid/Songxiang").GetComponent <Button>().interactable = false;
         transform.Find("grid/Muchai").gameObject.SetActive(false);
         transform.Find("grid/Muchai").GetComponent <Button>().interactable = false;
         transform.Find("grid/Xiabo").gameObject.SetActive(false);
         transform.Find("grid/Xiabo").GetComponent <Button>().interactable = false;
     }
     else if (SceneManager.GetActiveScene().name == "DDYB")
     {
         transform.Find("grid/Muchai").gameObject.SetActive(false);
         transform.Find("grid/Muchai").GetComponent <Button>().interactable = false;
         transform.Find("grid/Haiyan").gameObject.SetActive(false);
         transform.Find("grid/Haiyan").GetComponent <Button>().interactable = false;
     }
 }
示例#4
0
 private void Close()
 {
     TTUIPage.ClosePage(this);
 }