public void showActionPanel() { this.transform.position = BM.ActionPanelPos.position; this.transform.SetParent(BM.ActionPanelPos); this.transform.localScale = Vector3.one; this.GetComponent <RectTransform>().offsetMin = Vector2.zero; float dis = -BM.ActionPanelPos.GetComponent <RectTransform>().sizeDelta.y / 2; this.GetComponent <RectTransform>().offsetMax = Vector2.zero; // RectTransform rectT = ActionPanel.GetComponent <RectTransform>(); rectT.anchoredPosition = Vector2.zero; ActionPanel.GetComponent <CanvasGroup>().alpha = 0; ActionPanel.GetComponent <CanvasGroup>().interactable = false; refreshSkillsStatus(); if (BM._currentBUType == SDConstants.CharacterType.Hero) { GetComponent <CanvasGroup>().alpha = 1; ActionPanel.GetComponent <CanvasGroup>().DOFade(1, showAndHideTime); ActionPanel.GetComponent <CanvasGroup>().interactable = true; if (!DefaultSkill.GetComponent <NormalAttack>()) { DefaultSkill.BtnTapped(); } } this.transform.SetAsLastSibling(); }
public void OpenSDP(SkillFunction skill) { HSkilInfo info = skill.GetComponent <HSkilInfo>(); OneSkill detail = info.HSDetail; SkillPanelContent.GetComponent <Image>().color = Color.clear; SkillPanelContent.GetChild(0).localScale = Vector3.zero; SkillPanelContent.localScale = Vector3.one; SkillDetailsPanel.DOScale(Vector3.one, 0.15f).SetEase(Ease.OutBack); //显示当前技能详情 ShowThisSkillDetails(skill, detail); }