/// <summary> /// 更新头像信息 /// </summary> /// <param name="unit"></param> public void updateHeadInfo(GameObject unit) { BattleUnit data = unit.GetComponent <BattleUnit> (); chooseIcon.transform.position = new Vector3( unit.transform.position.x, unit.transform.position.y + data.getHeight(), 0); chooseIcon.SetActive(true); HeadInfo info = buttonHead.GetComponent <HeadInfo> (); info.updateHead(data.getUnitId(), data.GetAttributeData()); }