using UnityEngine; using UnityEngine.UI; namespace ScenesScripts.GalPlot { /// /// 选项类 /// public class GalComponent_Choice : MonoBehaviour { /// /// 这个选项要跳转到的ID /// public string _JumpID; /// /// 显示的文本 /// public Text _Title; public void Init (string JumpID, string Title) { _JumpID = JumpID; _Title.text = Title; } /// /// 当玩家按下了选项 /// public void Button_Click_JumpTo () { GalManager.PlotData.NowJumpID = _JumpID; GalManager.PlotData.IsBranch = true; GalManager_Text.IsCanJump = true; if (_JumpID == "-1") { return; } this.gameObject.transform.parent.GetComponent().Button_Click_Choice(); GameObject.Find("EventSystem").GetComponent().Button_Click_NextPlot(); return; } } }