public override void _Ready() { current = this; Game.instance.Connect(nameof(Game.busy_switch), this, nameof(on_BusySwitch)); Global.battle.Connect(nameof(Combat.Battle.next_turn), this, nameof(on_NextTurn)); skillPanel = GetNode <SkillPanel>("SkillPanel"); launcherPanel = GetNode <LauncherPanel>("LauncherPanel"); freezePanel = GetNode <Control>("FreezePanel"); skillPanel.Disable(); launcherPanel.Disable(); }
public override void mAwake() { base.mAwake(); transform.Find("Title/close").GetComponent <Button>().onClick.AddListener(Close); transform.Find("Title/name/left").GetComponent <Button>().onClick.AddListener(LeftCharacter); transform.Find("Title/name/right").GetComponent <Button>().onClick.AddListener(RightCharacter); HeadImage = transform.Find("Title/icon").GetComponent <Image>(); NameText = transform.Find("Title/name/name").GetComponent <Text>(); attributePanel = transform.Find("Down/AttributePanel").gameObject.AddComponent <CharacterAttributePanel>(); skillPanel = transform.Find("Down/SkillPanel").gameObject.AddComponent <SkillPanel>(); attributePanel.mAwake(); skillPanel.mAwake(); foreach (Transform item in transform.Find("Middle")) { tabToggle.Add(item.GetComponent <Toggle>()); } tabToggle[0].onValueChanged.AddListener(OpenAttributePanel); tabToggle[1].onValueChanged.AddListener(OpenSkillPanel); }