public void SetFrontScale() { var count = boxTransList.Count; for (int i = 0; i < count; i++) { var child = boxUITransList[i]; child.rotation = Quaternion.Euler(Vector3.zero); //缩放逻辑待添加 var dis = (boxTransList[i].transform.position - centerVec3).magnitude; if (dis < 0.05f) { if (i - 2 >= 0) { if (boxUITransList[i - 2].transform != null) { boxUITransList[i - 2].transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); } } if (i - 1 >= 0) { if (boxUITransList[i - 1].transform != null) { boxUITransList[i - 1].transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); } } if (boxUITransList[i].transform != null) { boxUITransList[i].transform.localScale = Vector3.one; } if (i + 1 <= 8) { if (boxUITransList[i + 1].transform != null) { boxUITransList[i + 1].transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); } } if (i + 2 <= 8) { if (boxUITransList[i + 2].transform != null) { boxUITransList[i + 2].transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); } } if (!isShow) { var e = new UIEvent_SkillFrame_OnSkillTalentSelected(SkillDataModel.SkillBoxes[i].SkillId); EventDispatcher.Instance.DispatchEvent(e); } } //boxUITransList[i].transform.localScale = Vector3.Lerp(boxUITransList[i].transform.localScale, boxUITransList[i + 1].transform.localScale, 0.5f * Time.deltaTime); } }
public void OnSkillBallOpen() { var e = new UIEvent_SkillFrame_OnSkillTalentSelected(BoxDataModel.SkillId); EventDispatcher.Instance.DispatchEvent(e); }