public void CloseUI() { UI_Popup LastPopUp = Managers.UI.PeekUI(); if (LastPopUp != null) { string temp = LastPopUp.PopUpName(); if (LastPopUp.ClosePopupUI()) { if (temp == "Inven") { _Inven = null; } else if (temp == "Equip") { _Equip = null; } else if (temp == "SkillTree") { _SkillTree = null; } } } }
// Start is called before the first frame update void Awake() { Bind <GameObject>(typeof(GameObjects)); _skillImage = Get <GameObject>((int)GameObjects.SkillSlot).GetComponent <Image>(); _skillUpBtn = Get <GameObject>((int)GameObjects.UpButton).GetComponent <Button>(); _SkillPointText = Get <GameObject>((int)GameObjects.SkillPointText).GetComponent <Text>(); _skillTree = GetComponentInParent <UI_SkillTree>(); }
public void ShowSkillTree() { if (_SkillTree == null) { _SkillTree = Managers.UI.ShowPopupUI <UI_SkillTree>("UI_SkillTree"); } else { if (_SkillTree.ClosePopupUI()) { _SkillTree = null; } } }