// Use this for initialization public void Init() { panduanindex = 0; valueMonitorPool.Clear(); gameObject.SetActive(false); ui = gameObject.GetComponent <UIPanel>().ui; RestartG = ui.GetChildWithPath("n1").asButton; RestartG.GetChild("text").text = "重新开始"; RestartG.onClick.Add(() => { GameStart.Instance.ReloadGame(); }); GameOverChoiceframe = ui.GetChild("GameOverChoiceframe").asCom; swordchoice = GameOverChoiceframe.GetChildWithPath("swordchoice").asCom; choice0 = GameOverChoiceframe.GetChild("n4").asRichTextField; choice1 = GameOverChoiceframe.GetChild("n5").asRichTextField; choicelist.Add(choice0); choicelist.Add(choice1); valueMonitorPool.AddMonitor(() => { return(panduanindex); }, (int from, int to) => { FocusIndex(panduanindex); }); alphachoice(0); choice0.onClick.Add(() => { FocusIndex(0); Restart(); }); choice1.onClick.Add(() => { FocusIndex(1); Debug.Log("out"); }); #region //关闭you die界面 UIManager.Instance.CreatSUIObj <SkeletonAnimation>("OverSpine01").gameObject.SetActive(false); UIManager.Instance.CreatSUIObj <SkeletonAnimation>("OverSpine02").gameObject.SetActive(false); #endregion }