| | |
| | | {
|
| | | [SerializeField] TextEx txtBase; //提升或降低前的战斗力
|
| | | [SerializeField] TextEx txtChange; //战斗力变化了多少
|
| | | [SerializeField] List<Font> changeFonts; //战力变化的字体
|
| | | [SerializeField] ImageEx imgArrow; //箭头
|
| | | [SerializeField] Transform transZhanLi; //战力整体框
|
| | | [SerializeField] Transform transZhanLiNumAll; //战力所有变化部分
|
| | | [SerializeField] RectTransform transChange; //箭头和变化数字整体框
|
| | | string uiFrameKey = "zhanli_dt";
|
| | | [SerializeField] UIFrame uiFrame;
|
| | | [SerializeField] List<PowerUpPosition> powerUpPositions;
|
| | | //[SerializeField] List<PowerUpPosition> powerUpPositions;
|
| | |
|
| | | [Header("淡入变大")]
|
| | | [SerializeField] Vector3 startVector; //起始大小
|
| | |
| | | {
|
| | | txtBase.text = DisplayBasePowerNum(basePower);
|
| | | txtChange.text = DisplayChangePowerNum(isAdd, changePower);
|
| | | txtChange.font = changeFonts[isAdd ? 0 : 1];
|
| | | imgArrow.SetSprite(DisplayState(isAdd));
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void CheckPosition()
|
| | | {
|
| | | var type = WindowType.None;
|
| | | // var type = WindowType.None;
|
| | |
|
| | | var _index = powerUpPositions.FindIndex((x) =>
|
| | | {
|
| | | return x.windowType == type;
|
| | | });
|
| | | if (_index != -1)
|
| | | {
|
| | | transZhanLi.transform.localPosition = powerUpPositions[_index].position;
|
| | | }
|
| | | // var _index = powerUpPositions.FindIndex((x) =>
|
| | | // {
|
| | | // return x.windowType == type;
|
| | | // });
|
| | | // if (_index != -1)
|
| | | // {
|
| | | // transZhanLi.transform.localPosition = powerUpPositions[_index].position;
|
| | | // }
|
| | | }
|
| | |
|
| | | [Serializable]
|