| | |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | ////using System.Collections;
|
| | | ////using System.Collections.Generic;
|
| | | ////using UnityEngine;
|
| | | ////using UnityEngine.UI;
|
| | |
|
| | | using System;
|
| | | using Snxxz.UI;
|
| | | ////using System;
|
| | | ////using Snxxz.UI;
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | //强化界面面板
|
| | | public class StrengtheningSripts : MonoBehaviour
|
| | | {
|
| | | //////强化界面面板
|
| | | ////public class StrengtheningSripts : MonoBehaviour
|
| | | ////{
|
| | |
|
| | | [SerializeField] ItemCell UpIteemCell;
|
| | | [SerializeField] ItemCell NowIteemCell;
|
| | | [SerializeField] ItemCell FullIteemCell;
|
| | | [SerializeField] Text GradeTextNext;
|
| | | [SerializeField] Text m_DefenseText;//防御力
|
| | | [SerializeField] Text m_DefenseNum;//防御增加值
|
| | | [SerializeField] Text m_LifeValueText;//生命
|
| | | [SerializeField] Text m_LifeValueNum;//生命增加值
|
| | | [SerializeField] Text m_AttText;//攻击
|
| | | [SerializeField] Text m_AttNum;//攻击增加值
|
| | | [SerializeField] Text m_Money_text;//背包铜钱数量
|
| | | [SerializeField] Text m_PromoteLimit;
|
| | | //// [SerializeField] ItemCell UpIteemCell;
|
| | | //// [SerializeField] ItemCell NowIteemCell;
|
| | | //// [SerializeField] ItemCell FullIteemCell;
|
| | | //// [SerializeField] Text GradeTextNext;
|
| | | //// [SerializeField] Text m_DefenseText;//防御力
|
| | | //// [SerializeField] Text m_DefenseNum;//防御增加值
|
| | | //// [SerializeField] Text m_LifeValueText;//生命
|
| | | //// [SerializeField] Text m_LifeValueNum;//生命增加值
|
| | | //// [SerializeField] Text m_AttText;//攻击
|
| | | //// [SerializeField] Text m_AttNum;//攻击增加值
|
| | | //// [SerializeField] Text m_Money_text;//背包铜钱数量
|
| | | //// [SerializeField] Text m_PromoteLimit;
|
| | |
|
| | | private Dictionary<int, string> _toggleName = new Dictionary<int, string>();//关于响应事件字典存储
|
| | | Dictionary<int, string> _toponym = new Dictionary<int, string>();
|
| | | private string[] _locationSort = new string[] { };//装备位优先级数组
|
| | | private List<int> _wear = new List<int>();//有穿戴的装备
|
| | | private List<int> _notWear = new List<int>();//未穿戴的装备
|
| | | private List<int> _fullLevel = new List<int>();//满阶的装备
|
| | | private GameObject _ScrollRectPanel;//活动框面板
|
| | | private Transform _content;//Toggle组
|
| | | public ScrollRect _Scrobar;//索引条 |
| | | //// private Dictionary<int, string> _toggleName = new Dictionary<int, string>();//关于响应事件字典存储
|
| | | //// Dictionary<int, string> _toponym = new Dictionary<int, string>();
|
| | | //// private string[] _locationSort = new string[] { };//装备位优先级数组
|
| | | //// private List<int> _wear = new List<int>();//有穿戴的装备
|
| | | //// private List<int> _notWear = new List<int>();//未穿戴的装备
|
| | | //// private List<int> _fullLevel = new List<int>();//满阶的装备
|
| | | //// private GameObject _ScrollRectPanel;//活动框面板
|
| | | //// private Transform _content;//Toggle组
|
| | | //// public ScrollRect _Scrobar;//索引条 |
| | |
|
| | | private Button _stopBtn;//停止强化
|
| | | private Button _strengBtn;//强化按钮
|
| | | private Button _automaticBtn;//自动强化按钮
|
| | | private Text _StrengImage;//强化Image
|
| | | //// private Button _stopBtn;//停止强化
|
| | | //// private Button _strengBtn;//强化按钮
|
| | | //// private Button _automaticBtn;//自动强化按钮
|
| | | //// private Text _StrengImage;//强化Image
|
| | |
|
| | | private Image TheningFloor;//控制显隐
|
| | | //// private Image TheningFloor;//控制显隐
|
| | |
|
| | | private Transform _TheningTop;//强化面板总
|
| | | private Transform _GridGreenImage;//强化面板
|
| | | private Image _gridAblueImage;//所需的金币
|
| | | private Text _moneyText;//需要升级的金钱
|
| | | private Button _MoneyButton;//金币按钮弹框
|
| | | private Text _gradText;//当前等级
|
| | | private Slider _slider;//经验条
|
| | | private Text _sliderText;//熟练度
|
| | | //// private Transform _TheningTop;//强化面板总
|
| | | //// private Transform _GridGreenImage;//强化面板
|
| | | //// private Image _gridAblueImage;//所需的金币
|
| | | //// private Text _moneyText;//需要升级的金钱
|
| | | //// private Button _MoneyButton;//金币按钮弹框
|
| | | //// private Text _gradText;//当前等级
|
| | | //// private Slider _slider;//经验条
|
| | | //// private Text _sliderText;//熟练度
|
| | |
|
| | | private Transform _GridGreenB;//满级面板
|
| | | private Text _LevelTextB;//满级的等级
|
| | | private Slider _GBSlider;//满级滑动条
|
| | | private Text _FillAText;//满级超出内容
|
| | | private Transform _AttributesBig;//未装备面板
|
| | | //// private Transform _GridGreenB;//满级面板
|
| | | //// private Text _LevelTextB;//满级的等级
|
| | | //// private Slider _GBSlider;//满级滑动条
|
| | | //// private Text _FillAText;//满级超出内容
|
| | | //// private Transform _AttributesBig;//未装备面板
|
| | |
|
| | | private int _tag;//用来当做标记位(当前的装备位置)
|
| | | private int _StrengtheningType = 0;//强化类型标记
|
| | | private int _StrengthenLevel = 0;//用来标记当前强化等级
|
| | | private ulong _money;//需要消耗的钱数
|
| | | EquipmentInitialization _equipment;
|
| | | private bool _boolIE;//是否再强化中
|
| | | private bool _open = true;
|
| | | private bool _ToggleDown = true;//默认第一次
|
| | | private int _lvInt;
|
| | | int _numberText;
|
| | | private float _flotA;
|
| | | private float _flotB;
|
| | | private bool _effects = true;
|
| | | public Transform _TheningFloor;
|
| | | public IntensifySmoothSlider _SmoothSlider;//Slider
|
| | | //// private int _tag;//用来当做标记位(当前的装备位置)
|
| | | //// private int _StrengtheningType = 0;//强化类型标记
|
| | | //// private int _StrengthenLevel = 0;//用来标记当前强化等级
|
| | | //// private ulong _money;//需要消耗的钱数
|
| | | //// EquipmentInitialization _equipment;
|
| | | //// private bool _boolIE;//是否再强化中
|
| | | //// private bool _open = true;
|
| | | //// private bool _ToggleDown = true;//默认第一次
|
| | | //// private int _lvInt;
|
| | | //// int _numberText;
|
| | | //// private float _flotA;
|
| | | //// private float _flotB;
|
| | | //// private bool _effects = true;
|
| | | //// public Transform _TheningFloor;
|
| | | //// public IntensifySmoothSlider _SmoothSlider;//Slider
|
| | |
|
| | | GetItemPathModel _GetItemPath;
|
| | | GetItemPathModel GetItemPath { get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); } }
|
| | | StrengthenModel m_StrengthengModel;
|
| | | StrengthenModel strengthengmodel { get { return m_StrengthengModel ?? (m_StrengthengModel = ModelCenter.Instance.GetModel<StrengthenModel>()); } }
|
| | | //// GetItemPathModel _GetItemPath;
|
| | | //// GetItemPathModel GetItemPath { get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); } }
|
| | | //// StrengthenModel m_StrengthengModel;
|
| | | //// StrengthenModel strengthengmodel { get { return m_StrengthengModel ?? (m_StrengthengModel = ModelCenter.Instance.GetModel<StrengthenModel>()); } }
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } }
|
| | | //// ItemTipsModel _itemTipsModel;
|
| | | //// ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } }
|
| | |
|
| | | PackModel _playerPack;
|
| | | PackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); } }
|
| | | PlayerMainDate m_MainModel;
|
| | | PlayerMainDate onMainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
|
| | | TaskModel m_PlayerTask;
|
| | | //// PackModel _playerPack;
|
| | | //// PackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); } }
|
| | | //// PlayerMainDate m_MainModel;
|
| | | //// PlayerMainDate onMainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
|
| | | //// TaskModel m_PlayerTask;
|
| | |
|
| | | public static Action IsFightUp;
|
| | | //// public static Action IsFightUp;
|
| | |
|
| | | [SerializeField] UIEffect _UIEffect1A;
|
| | | [SerializeField] UIEffect _UIEffect1B;
|
| | | [SerializeField] UIEffect _UIEffect1C;
|
| | | [SerializeField] UIEffect _UIEffect1D;
|
| | | //// [SerializeField] UIEffect _UIEffect1A;
|
| | | //// [SerializeField] UIEffect _UIEffect1B;
|
| | | //// [SerializeField] UIEffect _UIEffect1C;
|
| | | //// [SerializeField] UIEffect _UIEffect1D;
|
| | |
|
| | | [SerializeField] GameObject m_ImageBGObj;
|
| | | public float _Delaytime = 0.1f;//延迟时间
|
| | | public float _Contracttime = 0.15f;//发包时间
|
| | | //// [SerializeField] GameObject m_ImageBGObj;
|
| | | //// public float _Delaytime = 0.1f;//延迟时间
|
| | | //// public float _Contracttime = 0.15f;//发包时间
|
| | |
|
| | |
|
| | | private bool IsGuide = false;
|
| | | void Awake()
|
| | | {
|
| | | //// private bool IsGuide = false;
|
| | | //// void Awake()
|
| | | //// {
|
| | |
|
| | | #region 属性赋值
|
| | | _ScrollRectPanel = this.transform.Find("StrengBackground/ManagementFrame/ScrollRectPanel").gameObject;
|
| | | _content = this.transform.Find("StrengBackground/ManagementFrame/ScrollRectPanel/Viewport/Content");
|
| | | //// #region 属性赋值
|
| | | //// _ScrollRectPanel = this.transform.Find("StrengBackground/ManagementFrame/ScrollRectPanel").gameObject;
|
| | | //// _content = this.transform.Find("StrengBackground/ManagementFrame/ScrollRectPanel/Viewport/Content");
|
| | |
|
| | | _stopBtn = this.transform.Find("BottomFrame/StopBtn").GetComponent<Button>();
|
| | | _strengBtn = this.transform.Find("BottomFrame/StrengBtn").GetComponent<Button>();
|
| | | _StrengImage = this.transform.Find("BottomFrame/StrengBtn/StrengImage").GetComponent<Text>();
|
| | | _automaticBtn = this.transform.Find("BottomFrame/AutomaticBtn").GetComponent<Button>();
|
| | | //// _stopBtn = this.transform.Find("BottomFrame/StopBtn").GetComponent<Button>();
|
| | | //// _strengBtn = this.transform.Find("BottomFrame/StrengBtn").GetComponent<Button>();
|
| | | //// _StrengImage = this.transform.Find("BottomFrame/StrengBtn/StrengImage").GetComponent<Text>();
|
| | | //// _automaticBtn = this.transform.Find("BottomFrame/AutomaticBtn").GetComponent<Button>();
|
| | |
|
| | | TheningFloor = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor").GetComponent<Image>();
|
| | | //// TheningFloor = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor").GetComponent<Image>();
|
| | |
|
| | | _TheningTop = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop").transform;
|
| | | _GridGreenImage = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips").transform;
|
| | | //// _TheningTop = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop").transform;
|
| | | //// _GridGreenImage = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips").transform;
|
| | |
|
| | | _MoneyButton = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips/DownImage").GetComponent<Button>();
|
| | | _moneyText = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips/DownImage/Level_2_TAB").GetComponent<Text>();
|
| | | _gradText = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips/GradientAImage/GradText").GetComponent<Text>();
|
| | | _slider = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips/Slider").GetComponent<Slider>();
|
| | | _sliderText = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips/Slider/Background/NumericalText").GetComponent<Text>();
|
| | | //// _MoneyButton = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips/DownImage").GetComponent<Button>();
|
| | | //// _moneyText = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips/DownImage/Level_2_TAB").GetComponent<Text>();
|
| | | //// _gradText = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips/GradientAImage/GradText").GetComponent<Text>();
|
| | | //// _slider = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips/Slider").GetComponent<Slider>();
|
| | | //// _sliderText = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/StrengthenGreenATips/Slider/Background/NumericalText").GetComponent<Text>();
|
| | |
|
| | | _GridGreenB = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/GridGreenB").transform;
|
| | | _LevelTextB = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/GridGreenB/GridGreenBTips/Gradient/GradientText").GetComponent<Text>();
|
| | | _GBSlider = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/GridGreenB/GridGreenBTips/Slider").GetComponent<Slider>();
|
| | | _FillAText = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/GridGreenB/GridGreenBTips/Slider/Background/SkilledArticleText").GetComponent<Text>();
|
| | | //// _GridGreenB = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/GridGreenB").transform;
|
| | | //// _LevelTextB = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/GridGreenB/GridGreenBTips/Gradient/GradientText").GetComponent<Text>();
|
| | | //// _GBSlider = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/GridGreenB/GridGreenBTips/Slider").GetComponent<Slider>();
|
| | | //// _FillAText = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/GridGreenB/GridGreenBTips/Slider/Background/SkilledArticleText").GetComponent<Text>();
|
| | |
|
| | | _AttributesBig = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/AttributesBigTips").transform;
|
| | | #endregion
|
| | | //// _AttributesBig = this.transform.Find("StrengBackground/ManagementFrame/Background/TheningFloor/TheningTop/AttributesBigTips").transform;
|
| | | //// #endregion
|
| | |
|
| | | _toggleName.Add(1, "WeaponPlate");//武器
|
| | | _toggleName.Add(2, "DeputyPlate");//副手
|
| | | _toggleName.Add(3, "HelmetPlate");//帽子
|
| | | _toggleName.Add(4, "ChestPlate");//衣袍
|
| | | _toggleName.Add(5, "BeltPlate");//腰带
|
| | | _toggleName.Add(6, "ShinPads");//下装
|
| | | _toggleName.Add(7, "BootsPlate");//鞋履
|
| | | _toggleName.Add(8, "NecklacePlate");//项链
|
| | | _toggleName.Add(9, "FairyPlate1");//仙器1
|
| | | _toggleName.Add(10, "FairyPlate2");//仙器2
|
| | | _toponym.Add(1, Language.Get("Z1001"));
|
| | | _toponym.Add(2, Language.Get("Z1002"));
|
| | | _toponym.Add(3, Language.Get("Z1003"));
|
| | | _toponym.Add(4, Language.Get("Z1004"));
|
| | | _toponym.Add(5, Language.Get("Z1005"));
|
| | | _toponym.Add(6, Language.Get("Z1006"));
|
| | | _toponym.Add(7, Language.Get("Z1007"));
|
| | | _toponym.Add(8, Language.Get("Z1008"));
|
| | | _toponym.Add(9, Language.Get("Z1009"));
|
| | | _toponym.Add(10, Language.Get("Z1010"));
|
| | | }
|
| | | //// _toggleName.Add(1, "WeaponPlate");//武器
|
| | | //// _toggleName.Add(2, "DeputyPlate");//副手
|
| | | //// _toggleName.Add(3, "HelmetPlate");//帽子
|
| | | //// _toggleName.Add(4, "ChestPlate");//衣袍
|
| | | //// _toggleName.Add(5, "BeltPlate");//腰带
|
| | | //// _toggleName.Add(6, "ShinPads");//下装
|
| | | //// _toggleName.Add(7, "BootsPlate");//鞋履
|
| | | //// _toggleName.Add(8, "NecklacePlate");//项链
|
| | | //// _toggleName.Add(9, "FairyPlate1");//仙器1
|
| | | //// _toggleName.Add(10, "FairyPlate2");//仙器2
|
| | | //// _toponym.Add(1, Language.Get("Z1001"));
|
| | | //// _toponym.Add(2, Language.Get("Z1002"));
|
| | | //// _toponym.Add(3, Language.Get("Z1003"));
|
| | | //// _toponym.Add(4, Language.Get("Z1004"));
|
| | | //// _toponym.Add(5, Language.Get("Z1005"));
|
| | | //// _toponym.Add(6, Language.Get("Z1006"));
|
| | | //// _toponym.Add(7, Language.Get("Z1007"));
|
| | | //// _toponym.Add(8, Language.Get("Z1008"));
|
| | | //// _toponym.Add(9, Language.Get("Z1009"));
|
| | | //// _toponym.Add(10, Language.Get("Z1010"));
|
| | | //// }
|
| | |
|
| | | bool EffectsJudgment(int _tag)//特效判断
|
| | | {
|
| | | for (int i = 0; i < _wear.Count; i++)
|
| | | {
|
| | | if (_wear[i] == _tag)
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | | //// bool EffectsJudgment(int _tag)//特效判断
|
| | | //// {
|
| | | //// for (int i = 0; i < _wear.Count; i++)
|
| | | //// {
|
| | | //// if (_wear[i] == _tag)
|
| | | //// return true;
|
| | | //// }
|
| | | //// return false;
|
| | | //// }
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | | IsGuide = NewBieCenter.Instance.inGuiding && NewBieCenter.Instance.currentGuide == 10;
|
| | | _effects = true;
|
| | | _open = true;
|
| | | _money = PlayerDatas.Instance.baseData.allCopper;
|
| | | StrengthenModel.Event_Ha3b3 += EquipPartStar;//刷新服务器关于装备信息
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += RefreshMoney;//金钱的刷新
|
| | | Initialize();
|
| | | WindowCenter.Instance.windowBeforeCloseEvent += windowBeforeCloseEvent;
|
| | | }
|
| | | //// private void OnEnable()
|
| | | //// {
|
| | | //// IsGuide = NewBieCenter.Instance.inGuiding && NewBieCenter.Instance.currentGuide == 10;
|
| | | //// _effects = true;
|
| | | //// _open = true;
|
| | | //// _money = PlayerDatas.Instance.baseData.allCopper;
|
| | | //// StrengthenModel.Event_Ha3b3 += EquipPartStar;//刷新服务器关于装备信息
|
| | | //// PlayerDatas.Instance.playerDataRefreshEvent += RefreshMoney;//金钱的刷新
|
| | | //// Initialize();
|
| | | //// WindowCenter.Instance.windowBeforeCloseEvent += windowBeforeCloseEvent;
|
| | | //// }
|
| | |
|
| | | private void windowBeforeCloseEvent(Window obj)
|
| | | {
|
| | | if (obj as GetItemPathWin)
|
| | | {
|
| | | if (IsGuide)
|
| | | {
|
| | | NewBieCenter.Instance.StartNewBieGuide(92);
|
| | | IsGuide = false;
|
| | | }
|
| | | }
|
| | | }
|
| | | //// private void windowBeforeCloseEvent(Window obj)
|
| | | //// {
|
| | | //// if (obj as GetItemPathWin)
|
| | | //// {
|
| | | //// if (IsGuide)
|
| | | //// {
|
| | | //// NewBieCenter.Instance.StartNewBieGuide(92);
|
| | | //// IsGuide = false;
|
| | | //// }
|
| | | //// }
|
| | | //// }
|
| | |
|
| | | void Start()
|
| | | {
|
| | | #region 按钮注册
|
| | | _stopBtn.onClick.AddListener(StopBtn);
|
| | | UIEventTrigger.Get(_strengBtn.gameObject).OnDown = StrengBtn;
|
| | | UIEventTrigger.Get(_strengBtn.gameObject).OnUp = UpButton;
|
| | | _automaticBtn.onClick.AddListener(AutomaticBtn);
|
| | | _MoneyButton.onClick.AddListener(MoneyButton);
|
| | | #endregion
|
| | | }
|
| | | //// void Start()
|
| | | //// {
|
| | | //// #region 按钮注册
|
| | | //// _stopBtn.onClick.AddListener(StopBtn);
|
| | | //// UIEventTrigger.Get(_strengBtn.gameObject).OnDown = StrengBtn;
|
| | | //// UIEventTrigger.Get(_strengBtn.gameObject).OnUp = UpButton;
|
| | | //// _automaticBtn.onClick.AddListener(AutomaticBtn);
|
| | | //// _MoneyButton.onClick.AddListener(MoneyButton);
|
| | | //// #endregion
|
| | | //// }
|
| | |
|
| | |
|
| | | public void Initialize()
|
| | | {
|
| | | ClearToArray();
|
| | | m_Money_text.text = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3));
|
| | | _locationSort = LocationSort();//装备位优先级数组
|
| | | TheEquipment();//通过数组来份类是否穿戴 |
| | | DynamicAssignment();//动态赋值名称
|
| | | FindBind();
|
| | | if (strengthengmodel.equipmentA == 0)
|
| | | {
|
| | | _content.GetChild(0).GetComponent<Toggle>().isOn = true;//每次都是点亮第一个
|
| | | _Scrobar.verticalNormalizedPosition = 1;
|
| | | }
|
| | | else
|
| | | {
|
| | | string str = _toggleName[strengthengmodel.equipmentA];
|
| | | _content.transform.Find(str).GetComponent<Toggle>().isOn = true;
|
| | | for (int i = 0; i < _content.childCount; i++)
|
| | | {
|
| | | if (_content.GetChild(i).name == str)
|
| | | {
|
| | | int type = i;
|
| | | if (type >= 4)
|
| | | {
|
| | | var _position = (10 - type) * 104 + (10 - type - 1) * 4;
|
| | | _position -= 444;
|
| | | _Scrobar.verticalNormalizedPosition = Mathf.Clamp01(_position / (1076.0f - 444));
|
| | | _Scrobar.verticalNormalizedPosition = Mathf.Clamp01(_Scrobar.verticalNormalizedPosition + (50 / (1076.0f - 444)));
|
| | | }
|
| | | else
|
| | | {
|
| | | _Scrobar.verticalNormalizedPosition = 1;
|
| | | }
|
| | | //// public void Initialize()
|
| | | //// {
|
| | | //// ClearToArray();
|
| | | //// m_Money_text.text = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3));
|
| | | //// _locationSort = LocationSort();//装备位优先级数组
|
| | | //// TheEquipment();//通过数组来份类是否穿戴 |
| | | //// DynamicAssignment();//动态赋值名称
|
| | | //// FindBind();
|
| | | //// if (strengthengmodel.equipmentA == 0)
|
| | | //// {
|
| | | //// _content.GetChild(0).GetComponent<Toggle>().isOn = true;//每次都是点亮第一个
|
| | | //// _Scrobar.verticalNormalizedPosition = 1;
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// string str = _toggleName[strengthengmodel.equipmentA];
|
| | | //// _content.transform.Find(str).GetComponent<Toggle>().isOn = true;
|
| | | //// for (int i = 0; i < _content.childCount; i++)
|
| | | //// {
|
| | | //// if (_content.GetChild(i).name == str)
|
| | | //// {
|
| | | //// int type = i;
|
| | | //// if (type >= 4)
|
| | | //// {
|
| | | //// var _position = (10 - type) * 104 + (10 - type - 1) * 4;
|
| | | //// _position -= 444;
|
| | | //// _Scrobar.verticalNormalizedPosition = Mathf.Clamp01(_position / (1076.0f - 444));
|
| | | //// _Scrobar.verticalNormalizedPosition = Mathf.Clamp01(_Scrobar.verticalNormalizedPosition + (50 / (1076.0f - 444)));
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// _Scrobar.verticalNormalizedPosition = 1;
|
| | | //// }
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | | //// }
|
| | | //// }
|
| | | //// }
|
| | |
|
| | | _stopBtn.gameObject.SetActive(false);
|
| | | //// _stopBtn.gameObject.SetActive(false);
|
| | |
|
| | | }
|
| | | //// }
|
| | |
|
| | | void MoneyButton()//金币按钮弹框
|
| | | {
|
| | | //// void MoneyButton()//金币按钮弹框
|
| | | //// {
|
| | |
|
| | | GetItemPath.SetChinItemModel(2100);
|
| | | }
|
| | | //// GetItemPath.SetChinItemModel(2100);
|
| | | //// }
|
| | |
|
| | |
|
| | | #region Toggle按钮的点击事件
|
| | | void WeaponPlateT(bool _bool)
|
| | | {
|
| | | EventResponse(_bool, 1);
|
| | | }
|
| | | //// #region Toggle按钮的点击事件
|
| | | //// void WeaponPlateT(bool _bool)
|
| | | //// {
|
| | | //// EventResponse(_bool, 1);
|
| | | //// }
|
| | |
|
| | | void DeputyPlateT(bool _bool)
|
| | | {
|
| | | EventResponse(_bool, 2);
|
| | | }
|
| | | //// void DeputyPlateT(bool _bool)
|
| | | //// {
|
| | | //// EventResponse(_bool, 2);
|
| | | //// }
|
| | |
|
| | | void ChestPlateT(bool _bool)
|
| | | {
|
| | | EventResponse(_bool, 4);
|
| | | }
|
| | | //// void ChestPlateT(bool _bool)
|
| | | //// {
|
| | | //// EventResponse(_bool, 4);
|
| | | //// }
|
| | |
|
| | | void HelmetPlateT(bool _bool)
|
| | | {
|
| | | EventResponse(_bool, 3);
|
| | | }
|
| | | //// void HelmetPlateT(bool _bool)
|
| | | //// {
|
| | | //// EventResponse(_bool, 3);
|
| | | //// }
|
| | |
|
| | | void NecklacePlateT(bool _bool)
|
| | | {
|
| | | EventResponse(_bool, 8);
|
| | | }
|
| | | //// void NecklacePlateT(bool _bool)
|
| | | //// {
|
| | | //// EventResponse(_bool, 8);
|
| | | //// }
|
| | |
|
| | | void BeltPlateT(bool _bool)
|
| | | {
|
| | | EventResponse(_bool, 5);
|
| | | }
|
| | | //// void BeltPlateT(bool _bool)
|
| | | //// {
|
| | | //// EventResponse(_bool, 5);
|
| | | //// }
|
| | |
|
| | | void ShinPadsT(bool _bool)
|
| | | {
|
| | | EventResponse(_bool, 6);
|
| | | }
|
| | | //// void ShinPadsT(bool _bool)
|
| | | //// {
|
| | | //// EventResponse(_bool, 6);
|
| | | //// }
|
| | |
|
| | |
|
| | | void BootsPlateT(bool _bool)
|
| | | {
|
| | | EventResponse(_bool, 7);
|
| | | }
|
| | | //// void BootsPlateT(bool _bool)
|
| | | //// {
|
| | | //// EventResponse(_bool, 7);
|
| | | //// }
|
| | |
|
| | |
|
| | | void FairyPlate1T(bool _bool)
|
| | | {
|
| | | EventResponse(_bool, 9);
|
| | | }
|
| | | //// void FairyPlate1T(bool _bool)
|
| | | //// {
|
| | | //// EventResponse(_bool, 9);
|
| | | //// }
|
| | |
|
| | |
|
| | | void FairyPlate2T(bool _bool)
|
| | | {
|
| | | EventResponse(_bool, 10);
|
| | | }
|
| | | #endregion
|
| | | //// void FairyPlate2T(bool _bool)
|
| | | //// {
|
| | | //// EventResponse(_bool, 10);
|
| | | //// }
|
| | | //// #endregion
|
| | |
|
| | | void StopBtn()//停止强化
|
| | | {
|
| | | StopCoroutine("AutomaticRein");
|
| | | _boolIE = false;
|
| | | onMainModel.StrengthegingBool = _boolIE;
|
| | | if (IsFightUp != null)
|
| | | {
|
| | | IsFightUp();
|
| | | }
|
| | | _automaticBtn.gameObject.SetActive(true);//自动强化按钮
|
| | | _strengBtn.interactable = true;//强化按钮
|
| | | _StrengImage.color = new Color32(51, 8, 0, 255);
|
| | | _stopBtn.gameObject.SetActive(false);//停止强化按钮
|
| | | }
|
| | | //// void StopBtn()//停止强化
|
| | | //// {
|
| | | //// StopCoroutine("AutomaticRein");
|
| | | //// _boolIE = false;
|
| | | //// onMainModel.StrengthegingBool = _boolIE;
|
| | | //// if (IsFightUp != null)
|
| | | //// {
|
| | | //// IsFightUp();
|
| | | //// }
|
| | | //// _automaticBtn.gameObject.SetActive(true);//自动强化按钮
|
| | | //// _strengBtn.interactable = true;//强化按钮
|
| | | //// _StrengImage.color = new Color32(51, 8, 0, 255);
|
| | | //// _stopBtn.gameObject.SetActive(false);//停止强化按钮
|
| | | //// }
|
| | |
|
| | | void StrengBtn(GameObject obj)//强化
|
| | | {
|
| | | if (!_strengBtn.interactable)
|
| | | {
|
| | | return;
|
| | | }
|
| | | int _theType = SwitchControl(_tag);
|
| | | if (_theType == 1)
|
| | | {
|
| | | ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _tag);
|
| | | ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | if (strengthengmodel.EquipMax(_tag) != 3)
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag), ItemConfig.Get((int)item.itemId).LV, ItemConfig.Get(item.itemId).ItemColor);
|
| | | }
|
| | | else
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag), 0, 0);
|
| | | }
|
| | | if (_itemPM.levelMax > strengthengmodel._EqInfo[_tag].EquipPartStarLV)
|
| | | {
|
| | | if (Judgment(_tag))
|
| | | {
|
| | | _boolIE = true;
|
| | | onMainModel.StrengthegingBool = _boolIE;
|
| | | StartCoroutine("AutomaticRein");
|
| | | }
|
| | | else
|
| | | {
|
| | | StopBtn();
|
| | | GetItemPath.SetChinItemModel(2100);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("Z1012"));//装备强化满级
|
| | | }
|
| | | }
|
| | | else if (_theType == 2)
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("Z1013"));//请佩戴装备
|
| | | }
|
| | | else if (_theType == 3)
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("Z1012"));//装备强化满级
|
| | | }
|
| | | }
|
| | | //// void StrengBtn(GameObject obj)//强化
|
| | | //// {
|
| | | //// if (!_strengBtn.interactable)
|
| | | //// {
|
| | | //// return;
|
| | | //// }
|
| | | //// int _theType = SwitchControl(_tag);
|
| | | //// if (_theType == 1)
|
| | | //// {
|
| | | //// ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _tag);
|
| | | //// ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | //// if (strengthengmodel.EquipMax(_tag) != 3)
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag), ItemConfig.Get((int)item.itemId).LV, ItemConfig.Get(item.itemId).ItemColor);
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag), 0, 0);
|
| | | //// }
|
| | | //// if (_itemPM.levelMax > strengthengmodel._EqInfo[_tag].EquipPartStarLV)
|
| | | //// {
|
| | | //// if (Judgment(_tag))
|
| | | //// {
|
| | | //// _boolIE = true;
|
| | | //// onMainModel.StrengthegingBool = _boolIE;
|
| | | //// StartCoroutine("AutomaticRein");
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// StopBtn();
|
| | | //// GetItemPath.SetChinItemModel(2100);
|
| | | //// }
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// ServerTipDetails.DisplayNormalTip(Language.Get("Z1012"));//装备强化满级
|
| | | //// }
|
| | | //// }
|
| | | //// else if (_theType == 2)
|
| | | //// {
|
| | | //// ServerTipDetails.DisplayNormalTip(Language.Get("Z1013"));//请佩戴装备
|
| | | //// }
|
| | | //// else if (_theType == 3)
|
| | | //// {
|
| | | //// ServerTipDetails.DisplayNormalTip(Language.Get("Z1012"));//装备强化满级
|
| | | //// }
|
| | | //// }
|
| | |
|
| | | void UpButton(GameObject obj)
|
| | | {
|
| | | if (!_strengBtn.interactable)
|
| | | {
|
| | | return;
|
| | | }
|
| | | StopCoroutine("AutomaticRein");
|
| | | _boolIE = false;
|
| | | onMainModel.StrengthegingBool = _boolIE;
|
| | | if (IsFightUp != null)
|
| | | {
|
| | | IsFightUp();
|
| | | }
|
| | | }
|
| | | //// void UpButton(GameObject obj)
|
| | | //// {
|
| | | //// if (!_strengBtn.interactable)
|
| | | //// {
|
| | | //// return;
|
| | | //// }
|
| | | //// StopCoroutine("AutomaticRein");
|
| | | //// _boolIE = false;
|
| | | //// onMainModel.StrengthegingBool = _boolIE;
|
| | | //// if (IsFightUp != null)
|
| | | //// {
|
| | | //// IsFightUp();
|
| | | //// }
|
| | | //// }
|
| | |
|
| | | void AutomaticBtn()//自动强化
|
| | | {
|
| | | int _theType = SwitchControl(_tag);
|
| | | if (_theType == 1)
|
| | | {
|
| | | ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _tag);
|
| | | ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | if (strengthengmodel.EquipMax(_tag) != 3)
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag),
|
| | | // ItemConfig.Get(item.itemId).LV, ItemConfig.Get(item.itemId).ItemColor);
|
| | | }
|
| | | else
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag), 0, 0);
|
| | | }
|
| | | if (_itemPM.levelMax > strengthengmodel._EqInfo[_tag].EquipPartStarLV)
|
| | | {
|
| | | if (Judgment(_tag))
|
| | | {
|
| | | _automaticBtn.gameObject.SetActive(false);//自动强化按钮
|
| | | _strengBtn.interactable = false;//强化按钮
|
| | | _StrengImage.color = new Color32(51, 8, 0, 150);
|
| | | _stopBtn.gameObject.SetActive(true);//停止强化按钮
|
| | | _boolIE = true;
|
| | | onMainModel.StrengthegingBool = _boolIE;
|
| | | StartCoroutine("AutomaticRein");
|
| | | }
|
| | | else
|
| | | {
|
| | | StopBtn();
|
| | | GetItemPath.SetChinItemModel(2100);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("Z1012"));//装备强化满级
|
| | | }
|
| | | }
|
| | | else if (_theType == 2)
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("Z1013"));//请佩戴装备
|
| | | if (IsGuide)
|
| | | {
|
| | | NewBieCenter.Instance.StartNewBieGuide(92);
|
| | | IsGuide = false;
|
| | | }
|
| | | }
|
| | | else if (_theType == 3)
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("Z1012"));//装备强化满级
|
| | | }
|
| | | //// void AutomaticBtn()//自动强化
|
| | | //// {
|
| | | //// int _theType = SwitchControl(_tag);
|
| | | //// if (_theType == 1)
|
| | | //// {
|
| | | //// ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _tag);
|
| | | //// ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | //// if (strengthengmodel.EquipMax(_tag) != 3)
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag),
|
| | | //// // ItemConfig.Get(item.itemId).LV, ItemConfig.Get(item.itemId).ItemColor);
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag), 0, 0);
|
| | | //// }
|
| | | //// if (_itemPM.levelMax > strengthengmodel._EqInfo[_tag].EquipPartStarLV)
|
| | | //// {
|
| | | //// if (Judgment(_tag))
|
| | | //// {
|
| | | //// _automaticBtn.gameObject.SetActive(false);//自动强化按钮
|
| | | //// _strengBtn.interactable = false;//强化按钮
|
| | | //// _StrengImage.color = new Color32(51, 8, 0, 150);
|
| | | //// _stopBtn.gameObject.SetActive(true);//停止强化按钮
|
| | | //// _boolIE = true;
|
| | | //// onMainModel.StrengthegingBool = _boolIE;
|
| | | //// StartCoroutine("AutomaticRein");
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// StopBtn();
|
| | | //// GetItemPath.SetChinItemModel(2100);
|
| | | //// }
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// ServerTipDetails.DisplayNormalTip(Language.Get("Z1012"));//装备强化满级
|
| | | //// }
|
| | | //// }
|
| | | //// else if (_theType == 2)
|
| | | //// {
|
| | | //// ServerTipDetails.DisplayNormalTip(Language.Get("Z1013"));//请佩戴装备
|
| | | //// if (IsGuide)
|
| | | //// {
|
| | | //// NewBieCenter.Instance.StartNewBieGuide(92);
|
| | | //// IsGuide = false;
|
| | | //// }
|
| | | //// }
|
| | | //// else if (_theType == 3)
|
| | | //// {
|
| | | //// ServerTipDetails.DisplayNormalTip(Language.Get("Z1012"));//装备强化满级
|
| | | //// }
|
| | |
|
| | | }
|
| | | //// }
|
| | |
|
| | | IEnumerator AutomaticRein()//自动强化开始的协程
|
| | | {
|
| | | while (_boolIE)
|
| | | {
|
| | | if (Judgment(_tag))
|
| | | {
|
| | | if (_open)
|
| | | {
|
| | | CA301_tagEquipPlus _tagEPlus = new CA301_tagEquipPlus();
|
| | | _tagEPlus.ItemIndex = (ushort)_tag;
|
| | | _tagEPlus.PackType = 1;
|
| | | GameNetSystem.Instance.SendInfo(_tagEPlus);//向服务器发送装备位 |
| | | }
|
| | | yield return new WaitForSeconds(_Contracttime);
|
| | | }
|
| | | else
|
| | | {
|
| | | StopBtn();
|
| | | int _type = strengthengmodel.GameDefineIndex(_tag);//强化类型的返回
|
| | | ItemPlusConfig _itemPlus = ItemPlusConfig.GetTypeAndGrade(_type, strengthengmodel._EqInfo[_tag].EquipPartStarLV);
|
| | | _moneyText.text = MoneyContrast(_money);
|
| | | GetItemPath.SetChinItemModel(2100);
|
| | | yield return null;
|
| | | }
|
| | | }
|
| | | }
|
| | | void StrengthenRefresh()//数据的强化
|
| | | {
|
| | | int _number = strengthengmodel._EqInfo[_tag].EquipPartStarLV;//当前部位的等级 |
| | | ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _tag);
|
| | | if (item == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | if (strengthengmodel.EquipMax(_tag) != 3)
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag),
|
| | | // ItemConfig.Get(item.itemId).LV, ItemConfig.Get(item.itemId).ItemColor);
|
| | | }
|
| | | else
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag), 0, 0);
|
| | | }
|
| | | if (_itemPM.levelMax >= _number)
|
| | | {
|
| | | if (Judgment(_tag))
|
| | | {
|
| | | StrengtheningA(_tag);
|
| | | //// IEnumerator AutomaticRein()//自动强化开始的协程
|
| | | //// {
|
| | | //// while (_boolIE)
|
| | | //// {
|
| | | //// if (Judgment(_tag))
|
| | | //// {
|
| | | //// if (_open)
|
| | | //// {
|
| | | //// CA301_tagEquipPlus _tagEPlus = new CA301_tagEquipPlus();
|
| | | //// _tagEPlus.ItemIndex = (ushort)_tag;
|
| | | //// _tagEPlus.PackType = 1;
|
| | | //// GameNetSystem.Instance.SendInfo(_tagEPlus);//向服务器发送装备位 |
| | | //// }
|
| | | //// yield return new WaitForSeconds(_Contracttime);
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// //StopBtn();
|
| | | //// //int _type = strengthengmodel.GameDefineIndex(_tag);//强化类型的返回
|
| | | //// //ItemPlusConfig _itemPlus = ItemPlusConfig.GetTypeAndGrade(_type, strengthengmodel._EqInfo[_tag].EquipPartStarLV);
|
| | | //// //_moneyText.text = MoneyContrast(_money);
|
| | | //// //GetItemPath.SetChinItemModel(2100);
|
| | | //// yield return null;
|
| | | //// }
|
| | | //// }
|
| | | //// }
|
| | | //// void StrengthenRefresh()//数据的强化
|
| | | //// {
|
| | | //// int _number = strengthengmodel._EqInfo[_tag].EquipPartStarLV;//当前部位的等级 |
| | | //// ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _tag);
|
| | | //// if (item == null)
|
| | | //// {
|
| | | //// return;
|
| | | //// }
|
| | | //// ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | //// if (strengthengmodel.EquipMax(_tag) != 3)
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag),
|
| | | //// // ItemConfig.Get(item.itemId).LV, ItemConfig.Get(item.itemId).ItemColor);
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_tag), 0, 0);
|
| | | //// }
|
| | | //// if (_itemPM.levelMax >= _number)
|
| | | //// {
|
| | | //// if (Judgment(_tag))
|
| | | //// {
|
| | | //// StrengtheningA(_tag);
|
| | |
|
| | | }
|
| | | if (_number >= _itemPM.levelMax)
|
| | | {
|
| | | TheningFloor.color = new Color32(255, 255, 255, 0);
|
| | | _GridGreenImage.gameObject.SetActive(false);
|
| | | _AttributesBig.gameObject.SetActive(false);
|
| | | _GridGreenB.gameObject.SetActive(true);
|
| | | DisplayPromoteLv(_tag);
|
| | | _UIEffect1D.StopImediatly();
|
| | | FullLevel(_tag);
|
| | | _wear.Clear();
|
| | | _notWear.Clear();
|
| | | _fullLevel.Clear();
|
| | | TheEquipment();
|
| | | if (IsGuide)
|
| | | {
|
| | | NewBieCenter.Instance.StartNewBieGuide(92);
|
| | | IsGuide = false;
|
| | | }
|
| | | _automaticBtn.gameObject.SetActive(true);//自动强化按钮
|
| | | _strengBtn.interactable = true;//强化按钮
|
| | | _StrengImage.color = new Color32(51, 8, 0, 255);
|
| | | _stopBtn.gameObject.SetActive(false);//停止强化按钮
|
| | | StopCoroutine("AutomaticRein");
|
| | | _boolIE = false;
|
| | | onMainModel.StrengthegingBool = _boolIE;
|
| | | if (IsFightUp != null)
|
| | | {
|
| | | IsFightUp();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | List<int> StrengthList = new List<int>();
|
| | | string[] LocationSort()//装备位优先级
|
| | | {
|
| | | string _array = FuncConfigConfig.Get("StrengthenDisplay").Numerical1;
|
| | | string[] _Sarray = new string[] { };//接收排序
|
| | | List<string> SortList = new List<string>();
|
| | | if (StrengthList.Count <= 0)
|
| | | {
|
| | | for (int i = 0; i < ConfigParse.GetMultipleStr(_array).Length; i++)
|
| | | {
|
| | | StrengthList.Add(int.Parse(ConfigParse.GetMultipleStr(_array)[i]));
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < ConfigParse.GetMultipleStr(_array).Length; i++)
|
| | | {
|
| | | SortList.Add(ConfigParse.GetMultipleStr(_array)[i]);
|
| | | }
|
| | | SortList.Sort(Compare);
|
| | | _Sarray = SortList.ToArray();
|
| | | return _Sarray;
|
| | | }
|
| | | //// }
|
| | | //// if (_number >= _itemPM.levelMax)
|
| | | //// {
|
| | | //// TheningFloor.color = new Color32(255, 255, 255, 0);
|
| | | //// _GridGreenImage.gameObject.SetActive(false);
|
| | | //// _AttributesBig.gameObject.SetActive(false);
|
| | | //// _GridGreenB.gameObject.SetActive(true);
|
| | | //// DisplayPromoteLv(_tag);
|
| | | //// _UIEffect1D.StopImediatly();
|
| | | //// FullLevel(_tag);
|
| | | //// _wear.Clear();
|
| | | //// _notWear.Clear();
|
| | | //// _fullLevel.Clear();
|
| | | //// TheEquipment();
|
| | | //// if (IsGuide)
|
| | | //// {
|
| | | //// NewBieCenter.Instance.StartNewBieGuide(92);
|
| | | //// IsGuide = false;
|
| | | //// }
|
| | | //// _automaticBtn.gameObject.SetActive(true);//自动强化按钮
|
| | | //// _strengBtn.interactable = true;//强化按钮
|
| | | //// _StrengImage.color = new Color32(51, 8, 0, 255);
|
| | | //// _stopBtn.gameObject.SetActive(false);//停止强化按钮
|
| | | //// StopCoroutine("AutomaticRein");
|
| | | //// _boolIE = false;
|
| | | //// onMainModel.StrengthegingBool = _boolIE;
|
| | | //// if (IsFightUp != null)
|
| | | //// {
|
| | | //// IsFightUp();
|
| | | //// }
|
| | | //// }
|
| | | //// }
|
| | | //// }
|
| | | //// List<int> StrengthList = new List<int>();
|
| | | //// string[] LocationSort()//装备位优先级
|
| | | //// {
|
| | | //// string _array = FuncConfigConfig.Get("StrengthenDisplay").Numerical1;
|
| | | //// string[] _Sarray = new string[] { };//接收排序
|
| | | //// List<string> SortList = new List<string>();
|
| | | //// if (StrengthList.Count <= 0)
|
| | | //// {
|
| | | //// for (int i = 0; i < ConfigParse.GetMultipleStr(_array).Length; i++)
|
| | | //// {
|
| | | //// StrengthList.Add(int.Parse(ConfigParse.GetMultipleStr(_array)[i]));
|
| | | //// }
|
| | | //// }
|
| | | //// for (int i = 0; i < ConfigParse.GetMultipleStr(_array).Length; i++)
|
| | | //// {
|
| | | //// SortList.Add(ConfigParse.GetMultipleStr(_array)[i]);
|
| | | //// }
|
| | | //// SortList.Sort(Compare);
|
| | | //// _Sarray = SortList.ToArray();
|
| | | //// return _Sarray;
|
| | | //// }
|
| | |
|
| | | private int Compare(string x, string y)//数组排列
|
| | | {
|
| | | var _index_x = int.Parse(x);
|
| | | var _index_y = int.Parse(y);
|
| | | bool havex = IsFairyDevice(_index_x);
|
| | | bool havey = IsFairyDevice(_index_y);
|
| | | if (havex.CompareTo(havey) != 0)
|
| | | {
|
| | | return -havex.CompareTo(havey);
|
| | | }
|
| | | var _sort_x = StrengthList.IndexOf(_index_x);
|
| | | var _sort_y = StrengthList.IndexOf(_index_y);
|
| | | return _sort_x.CompareTo(_sort_y);
|
| | | }
|
| | | //// private int Compare(string x, string y)//数组排列
|
| | | //// {
|
| | | //// var _index_x = int.Parse(x);
|
| | | //// var _index_y = int.Parse(y);
|
| | | //// bool havex = IsFairyDevice(_index_x);
|
| | | //// bool havey = IsFairyDevice(_index_y);
|
| | | //// if (havex.CompareTo(havey) != 0)
|
| | | //// {
|
| | | //// return -havex.CompareTo(havey);
|
| | | //// }
|
| | | //// var _sort_x = StrengthList.IndexOf(_index_x);
|
| | | //// var _sort_y = StrengthList.IndexOf(_index_y);
|
| | | //// return _sort_x.CompareTo(_sort_y);
|
| | | //// }
|
| | |
|
| | | private bool IsFairyDevice(int Index)
|
| | | {
|
| | | if (Index == 9 || Index == 10)
|
| | | {
|
| | | SinglePack singlePack = playerPack.GetSinglePack(PackType.Equip);
|
| | | if (singlePack != null && singlePack.GetAllItems().ContainsKey(Index))
|
| | | {
|
| | | ItemModel item = singlePack.GetItemByIndex(Index);
|
| | | ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(Index), 0, 0);
|
| | | if (_itemPM.levelMax > strengthengmodel._EqInfo[Index].EquipPartStarLV)//最大可升阶等级和服务端对比
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | | //// private bool IsFairyDevice(int Index)
|
| | | //// {
|
| | | //// if (Index == 9 || Index == 10)
|
| | | //// {
|
| | | //// SinglePack singlePack = playerPack.GetSinglePack(PackType.Equip);
|
| | | //// if (singlePack != null && singlePack.GetAllItems().ContainsKey(Index))
|
| | | //// {
|
| | | //// ItemModel item = singlePack.GetItemByIndex(Index);
|
| | | //// ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(Index), 0, 0);
|
| | | //// if (_itemPM.levelMax > strengthengmodel._EqInfo[Index].EquipPartStarLV)//最大可升阶等级和服务端对比
|
| | | //// {
|
| | | //// return true;
|
| | | //// }
|
| | | //// }
|
| | | //// }
|
| | | //// return false;
|
| | | //// }
|
| | |
|
| | | void TheEquipment()//通过数组来份类是否穿戴
|
| | | {
|
| | | for (int i = 0; i < _locationSort.Length; i++)
|
| | | {
|
| | | SinglePack singlePack = playerPack.GetSinglePack(PackType.Equip);
|
| | | if (singlePack == null)
|
| | | {
|
| | | _notWear.Add(int.Parse(_locationSort[i]));//未穿戴
|
| | | continue;
|
| | | }
|
| | | //// void TheEquipment()//通过数组来份类是否穿戴
|
| | | //// {
|
| | | //// for (int i = 0; i < _locationSort.Length; i++)
|
| | | //// {
|
| | | //// SinglePack singlePack = playerPack.GetSinglePack(PackType.Equip);
|
| | | //// if (singlePack == null)
|
| | | //// {
|
| | | //// _notWear.Add(int.Parse(_locationSort[i]));//未穿戴
|
| | | //// continue;
|
| | | //// }
|
| | |
|
| | | if (singlePack.GetAllItems().ContainsKey(int.Parse(_locationSort[i])))
|
| | | {
|
| | | ItemModel item = singlePack.GetItemByIndex(int.Parse(_locationSort[i]));
|
| | | ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | if (strengthengmodel.EquipMax(int.Parse(_locationSort[i])) != 3)
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(int.Parse(_locationSort[i])),
|
| | | // ItemConfig.Get(item.itemId).LV, ItemConfig.Get(item.itemId).ItemColor);
|
| | | }
|
| | | else
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(int.Parse(_locationSort[i])), 0, 0);
|
| | | }
|
| | | if (_itemPM.levelMax > strengthengmodel._EqInfo[int.Parse(_locationSort[i])].EquipPartStarLV)//最大可升阶等级和服务端对比
|
| | | {
|
| | | _wear.Add(int.Parse(_locationSort[i]));//未满阶
|
| | | }
|
| | | else
|
| | | {
|
| | | _fullLevel.Add(int.Parse(_locationSort[i]));//满阶
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | _notWear.Add(int.Parse(_locationSort[i]));//未穿戴
|
| | | }
|
| | | }
|
| | | }
|
| | | //// if (singlePack.GetAllItems().ContainsKey(int.Parse(_locationSort[i])))
|
| | | //// {
|
| | | //// ItemModel item = singlePack.GetItemByIndex(int.Parse(_locationSort[i]));
|
| | | //// ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | //// if (strengthengmodel.EquipMax(int.Parse(_locationSort[i])) != 3)
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(int.Parse(_locationSort[i])),
|
| | | //// // ItemConfig.Get(item.itemId).LV, ItemConfig.Get(item.itemId).ItemColor);
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(int.Parse(_locationSort[i])), 0, 0);
|
| | | //// }
|
| | | //// if (_itemPM.levelMax > strengthengmodel._EqInfo[int.Parse(_locationSort[i])].EquipPartStarLV)//最大可升阶等级和服务端对比
|
| | | //// {
|
| | | //// _wear.Add(int.Parse(_locationSort[i]));//未满阶
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// _fullLevel.Add(int.Parse(_locationSort[i]));//满阶
|
| | | //// }
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// _notWear.Add(int.Parse(_locationSort[i]));//未穿戴
|
| | | //// }
|
| | | //// }
|
| | | //// }
|
| | |
|
| | |
|
| | | void DynamicAssignment()//动态赋值名称
|
| | | {
|
| | | //// void DynamicAssignment()//动态赋值名称
|
| | | //// {
|
| | |
|
| | | for (int i = 1; i <= _locationSort.Length; i++)
|
| | | {
|
| | | //// for (int i = 1; i <= _locationSort.Length; i++)
|
| | | //// {
|
| | |
|
| | | if (i <= _wear.Count)//有装备
|
| | | {
|
| | | _content.GetChild(i - 1).gameObject.name = _toggleName[(_wear[i - 1])];
|
| | | int part = (_wear[i - 1]);
|
| | | _content.GetChild(i - 1).transform.Find("RedPoint").GetComponent<RedpointBehaviour>().redpointId = strengthengmodel.StrengthengRedPoint[part].id;
|
| | | ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _wear[i - 1]);
|
| | | _content.GetChild(i - 1).transform.Find("BGMImage").gameObject.SetActive(false);
|
| | | ItemCell _ItemCell = _content.GetChild(i - 1).transform.Find("ItemCell").GetComponent<ItemCell>();
|
| | | _ItemCell.gameObject.SetActive(true);
|
| | | _ItemCell.Init(item);
|
| | | _content.GetChild(i - 1).transform.Find("ContentText").GetComponent<Text>().text = ItemColor((int)item.itemId, (_wear[i - 1]));
|
| | | _content.GetChild(i - 1).transform.Find("ContentText").gameObject.SetActive(true);
|
| | | _content.GetChild(i - 1).transform.Find("TextBGPanel").gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (i - _wear.Count <= _notWear.Count)//没装备
|
| | | {
|
| | | //// if (i <= _wear.Count)//有装备
|
| | | //// {
|
| | | //// _content.GetChild(i - 1).gameObject.name = _toggleName[(_wear[i - 1])];
|
| | | //// int part = (_wear[i - 1]);
|
| | | //// _content.GetChild(i - 1).transform.Find("RedPoint").GetComponent<RedpointBehaviour>().redpointId = strengthengmodel.StrengthengRedPoint[part].id;
|
| | | //// ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _wear[i - 1]);
|
| | | //// _content.GetChild(i - 1).transform.Find("BGMImage").gameObject.SetActive(false);
|
| | | //// ItemCell _ItemCell = _content.GetChild(i - 1).transform.Find("ItemCell").GetComponent<ItemCell>();
|
| | | //// _ItemCell.gameObject.SetActive(true);
|
| | | //// _ItemCell.Init(item);
|
| | | //// _content.GetChild(i - 1).transform.Find("ContentText").GetComponent<Text>().text = ItemColor((int)item.itemId, (_wear[i - 1]));
|
| | | //// _content.GetChild(i - 1).transform.Find("ContentText").gameObject.SetActive(true);
|
| | | //// _content.GetChild(i - 1).transform.Find("TextBGPanel").gameObject.SetActive(false);
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// if (i - _wear.Count <= _notWear.Count)//没装备
|
| | | //// {
|
| | |
|
| | | _content.GetChild(i - 1).gameObject.name = _toggleName[(_notWear[i - _wear.Count - 1])];
|
| | | int part = (_notWear[i - _wear.Count - 1]);
|
| | | _content.GetChild(i - 1).transform.Find("RedPoint").GetComponent<RedpointBehaviour>().redpointId = strengthengmodel.StrengthengRedPoint[part].id;
|
| | | _content.GetChild(i - 1).transform.Find("BGMImage").gameObject.SetActive(true);
|
| | | _content.GetChild(i - 1).transform.Find("ItemCell").gameObject.SetActive(false);
|
| | | _content.GetChild(i - 1).transform.Find("ContentText").gameObject.SetActive(false);
|
| | | _content.GetChild(i - 1).transform.Find("TextBGPanel").gameObject.SetActive(true);
|
| | | _content.GetChild(i - 1).transform.Find("TextBGPanel/UpText").GetComponent<Text>().text = Language.Get("Z1015") + _toponym[(_notWear[i - _wear.Count - 1])];
|
| | | }
|
| | | else//满阶
|
| | | {
|
| | | _content.GetChild(i - 1).gameObject.name = _toggleName[(_fullLevel[i - _wear.Count - _notWear.Count - 1])];
|
| | | int part = (_fullLevel[i - _wear.Count - _notWear.Count - 1]);
|
| | | _content.GetChild(i - 1).transform.Find("RedPoint").GetComponent<RedpointBehaviour>().redpointId = strengthengmodel.StrengthengRedPoint[part].id;
|
| | | _content.GetChild(i - 1).transform.Find("BGMImage").gameObject.SetActive(false);
|
| | | ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _fullLevel[i - _wear.Count - _notWear.Count - 1]);
|
| | | ItemCell _ItemCell = _content.GetChild(i - 1).transform.Find("ItemCell").GetComponent<ItemCell>();
|
| | | _ItemCell.gameObject.SetActive(true);
|
| | | _ItemCell.Init(item);
|
| | | _content.GetChild(i - 1).transform.Find("ContentText").GetComponent<Text>().text = ItemColor((int)item.itemId, (_fullLevel[i - _wear.Count - _notWear.Count - 1]));
|
| | | _content.GetChild(i - 1).transform.Find("ContentText").gameObject.SetActive(true);
|
| | | _content.GetChild(i - 1).transform.Find("TextBGPanel").gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | //// _content.GetChild(i - 1).gameObject.name = _toggleName[(_notWear[i - _wear.Count - 1])];
|
| | | //// int part = (_notWear[i - _wear.Count - 1]);
|
| | | //// _content.GetChild(i - 1).transform.Find("RedPoint").GetComponent<RedpointBehaviour>().redpointId = strengthengmodel.StrengthengRedPoint[part].id;
|
| | | //// _content.GetChild(i - 1).transform.Find("BGMImage").gameObject.SetActive(true);
|
| | | //// _content.GetChild(i - 1).transform.Find("ItemCell").gameObject.SetActive(false);
|
| | | //// _content.GetChild(i - 1).transform.Find("ContentText").gameObject.SetActive(false);
|
| | | //// _content.GetChild(i - 1).transform.Find("TextBGPanel").gameObject.SetActive(true);
|
| | | //// _content.GetChild(i - 1).transform.Find("TextBGPanel/UpText").GetComponent<Text>().text = Language.Get("Z1015") + _toponym[(_notWear[i - _wear.Count - 1])];
|
| | | //// }
|
| | | //// else//满阶
|
| | | //// {
|
| | | //// _content.GetChild(i - 1).gameObject.name = _toggleName[(_fullLevel[i - _wear.Count - _notWear.Count - 1])];
|
| | | //// int part = (_fullLevel[i - _wear.Count - _notWear.Count - 1]);
|
| | | //// _content.GetChild(i - 1).transform.Find("RedPoint").GetComponent<RedpointBehaviour>().redpointId = strengthengmodel.StrengthengRedPoint[part].id;
|
| | | //// _content.GetChild(i - 1).transform.Find("BGMImage").gameObject.SetActive(false);
|
| | | //// ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _fullLevel[i - _wear.Count - _notWear.Count - 1]);
|
| | | //// ItemCell _ItemCell = _content.GetChild(i - 1).transform.Find("ItemCell").GetComponent<ItemCell>();
|
| | | //// _ItemCell.gameObject.SetActive(true);
|
| | | //// _ItemCell.Init(item);
|
| | | //// _content.GetChild(i - 1).transform.Find("ContentText").GetComponent<Text>().text = ItemColor((int)item.itemId, (_fullLevel[i - _wear.Count - _notWear.Count - 1]));
|
| | | //// _content.GetChild(i - 1).transform.Find("ContentText").gameObject.SetActive(true);
|
| | | //// _content.GetChild(i - 1).transform.Find("TextBGPanel").gameObject.SetActive(false);
|
| | | //// }
|
| | | //// }
|
| | | //// }
|
| | | //// }
|
| | |
|
| | | void FindBind()//Toggle 的动态赋值
|
| | | {
|
| | | for (int i = 0; i < _content.childCount; i++)
|
| | | {
|
| | | _content.GetChild(i).transform.GetComponent<Toggle>().onValueChanged.RemoveAllListeners();
|
| | | }
|
| | | _content.Find("WeaponPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | delegate (bool _bool)
|
| | | {
|
| | | WeaponPlateT(_bool);
|
| | | }
|
| | | );
|
| | | _content.Find("DeputyPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | delegate (bool _bool)
|
| | | {
|
| | | DeputyPlateT(_bool);
|
| | | }
|
| | | );
|
| | | _content.Find("HelmetPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | delegate (bool _bool)
|
| | | {
|
| | | HelmetPlateT(_bool);
|
| | | }
|
| | | );
|
| | | _content.Find("ChestPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | delegate (bool _bool)
|
| | | {
|
| | | ChestPlateT(_bool);
|
| | | }
|
| | | );
|
| | | _content.Find("BeltPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | delegate (bool _bool)
|
| | | {
|
| | | BeltPlateT(_bool);
|
| | | }
|
| | | );
|
| | | _content.Find("ShinPads").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | delegate (bool _bool)
|
| | | {
|
| | | ShinPadsT(_bool);
|
| | | }
|
| | | );
|
| | | _content.Find("BootsPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | delegate (bool _bool)
|
| | | {
|
| | | BootsPlateT(_bool);
|
| | | }
|
| | | );
|
| | | _content.Find("NecklacePlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | delegate (bool _bool)
|
| | | {
|
| | | NecklacePlateT(_bool);
|
| | | }
|
| | | );
|
| | | _content.Find("FairyPlate1").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | delegate (bool _bool)
|
| | | {
|
| | | FairyPlate1T(_bool);
|
| | | }
|
| | | );
|
| | | _content.Find("FairyPlate2").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | delegate (bool _bool)
|
| | | {
|
| | | FairyPlate2T(_bool);
|
| | | }
|
| | | );
|
| | | }//查找Toggle和赋值
|
| | | //// void FindBind()//Toggle 的动态赋值
|
| | | //// {
|
| | | //// for (int i = 0; i < _content.childCount; i++)
|
| | | //// {
|
| | | //// _content.GetChild(i).transform.GetComponent<Toggle>().onValueChanged.RemoveAllListeners();
|
| | | //// }
|
| | | //// _content.Find("WeaponPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | //// delegate (bool _bool)
|
| | | //// {
|
| | | //// WeaponPlateT(_bool);
|
| | | //// }
|
| | | //// );
|
| | | //// _content.Find("DeputyPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | //// delegate (bool _bool)
|
| | | //// {
|
| | | //// DeputyPlateT(_bool);
|
| | | //// }
|
| | | //// );
|
| | | //// _content.Find("HelmetPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | //// delegate (bool _bool)
|
| | | //// {
|
| | | //// HelmetPlateT(_bool);
|
| | | //// }
|
| | | //// );
|
| | | //// _content.Find("ChestPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | //// delegate (bool _bool)
|
| | | //// {
|
| | | //// ChestPlateT(_bool);
|
| | | //// }
|
| | | //// );
|
| | | //// _content.Find("BeltPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | //// delegate (bool _bool)
|
| | | //// {
|
| | | //// BeltPlateT(_bool);
|
| | | //// }
|
| | | //// );
|
| | | //// _content.Find("ShinPads").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | //// delegate (bool _bool)
|
| | | //// {
|
| | | //// ShinPadsT(_bool);
|
| | | //// }
|
| | | //// );
|
| | | //// _content.Find("BootsPlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | //// delegate (bool _bool)
|
| | | //// {
|
| | | //// BootsPlateT(_bool);
|
| | | //// }
|
| | | //// );
|
| | | //// _content.Find("NecklacePlate").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | //// delegate (bool _bool)
|
| | | //// {
|
| | | //// NecklacePlateT(_bool);
|
| | | //// }
|
| | | //// );
|
| | | //// _content.Find("FairyPlate1").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | //// delegate (bool _bool)
|
| | | //// {
|
| | | //// FairyPlate1T(_bool);
|
| | | //// }
|
| | | //// );
|
| | | //// _content.Find("FairyPlate2").GetComponent<Toggle>().onValueChanged.AddListener(
|
| | | //// delegate (bool _bool)
|
| | | //// {
|
| | | //// FairyPlate2T(_bool);
|
| | | //// }
|
| | | //// );
|
| | | //// }//查找Toggle和赋值
|
| | |
|
| | | int SwitchControl(int _arrayNumber)//返回是否有穿戴装备
|
| | | {
|
| | | _wear.Clear();
|
| | | _notWear.Clear();
|
| | | _fullLevel.Clear();
|
| | | TheEquipment();
|
| | | for (int i = 0; i < _wear.Count; i++)//有装备
|
| | | {
|
| | | if (_wear[i] == _arrayNumber)
|
| | | return 1;
|
| | | }
|
| | | //// int SwitchControl(int _arrayNumber)//返回是否有穿戴装备
|
| | | //// {
|
| | | //// _wear.Clear();
|
| | | //// _notWear.Clear();
|
| | | //// _fullLevel.Clear();
|
| | | //// TheEquipment();
|
| | | //// for (int i = 0; i < _wear.Count; i++)//有装备
|
| | | //// {
|
| | | //// if (_wear[i] == _arrayNumber)
|
| | | //// return 1;
|
| | | //// }
|
| | |
|
| | | for (int j = 0; j < _notWear.Count; j++)//无装备
|
| | | {
|
| | | if (_notWear[j] == _arrayNumber)
|
| | | return 2;
|
| | | }
|
| | | for (int k = 0; k < _fullLevel.Count; k++)//满阶
|
| | | {
|
| | | if (_fullLevel[k] == _arrayNumber)
|
| | | return 3;
|
| | | }
|
| | | return 0;
|
| | | }
|
| | | //// for (int j = 0; j < _notWear.Count; j++)//无装备
|
| | | //// {
|
| | | //// if (_notWear[j] == _arrayNumber)
|
| | | //// return 2;
|
| | | //// }
|
| | | //// for (int k = 0; k < _fullLevel.Count; k++)//满阶
|
| | | //// {
|
| | | //// if (_fullLevel[k] == _arrayNumber)
|
| | | //// return 3;
|
| | | //// }
|
| | | //// return 0;
|
| | | //// }
|
| | |
|
| | | void FullLevel(int _number)//满级面板的赋值
|
| | | {
|
| | | TheningFloor.color = new Color32(255, 255, 255, 0);
|
| | | int _theTpye = strengthengmodel.GameDefineIndex(_number);
|
| | | ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _number);
|
| | | FullIteemCell.Init(item);
|
| | | FullIteemCell.cellBtn.RemoveAllListeners();
|
| | | FullIteemCell.cellBtn.AddListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Equip, item.guid);
|
| | | });
|
| | | ItemPlusMaxConfig _tagItem = new ItemPlusMaxConfig();
|
| | | if (strengthengmodel.EquipMax(_number) != 3)
|
| | | {
|
| | | //_tagItem = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_number),
|
| | | // ItemConfig.Get(item.itemId).LV, ItemConfig.Get(item.itemId).ItemColor);
|
| | | }
|
| | | else
|
| | | {
|
| | | //_tagItem = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_number), 0, 0);
|
| | | }
|
| | | _LevelTextB.text = _tagItem.levelMax.ToString();
|
| | | if (_tagItem.levelMax == strengthengmodel._EqInfo[_number].EquipPartStarLV)
|
| | | {
|
| | | //// void FullLevel(int _number)//满级面板的赋值
|
| | | //// {
|
| | | //// TheningFloor.color = new Color32(255, 255, 255, 0);
|
| | | //// int _theTpye = strengthengmodel.GameDefineIndex(_number);
|
| | | //// ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _number);
|
| | | //// FullIteemCell.Init(item);
|
| | | //// FullIteemCell.cellBtn.RemoveAllListeners();
|
| | | //// FullIteemCell.cellBtn.AddListener(() =>
|
| | | //// {
|
| | | //// itemTipsModel.SetItemTipsModel(PackType.Equip, item.guid);
|
| | | //// });
|
| | | //// ItemPlusMaxConfig _tagItem = new ItemPlusMaxConfig();
|
| | | //// if (strengthengmodel.EquipMax(_number) != 3)
|
| | | //// {
|
| | | //// //_tagItem = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_number),
|
| | | //// // ItemConfig.Get(item.itemId).LV, ItemConfig.Get(item.itemId).ItemColor);
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// //_tagItem = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_number), 0, 0);
|
| | | //// }
|
| | | //// _LevelTextB.text = _tagItem.levelMax.ToString();
|
| | | //// if (_tagItem.levelMax == strengthengmodel._EqInfo[_number].EquipPartStarLV)
|
| | | //// {
|
| | |
|
| | | _FillAText.text = string.Format(Language.Get("Z1016"), strengthengmodel._EqInfo[_number].Proficiency);
|
| | | }
|
| | | else
|
| | | {
|
| | | ItemPlusConfig _tagItem_A = ItemPlusConfig.GetTypeAndGrade(_theTpye, strengthengmodel._EqInfo[_number].EquipPartStarLV);
|
| | | ItemPlusConfig _tagItem_B = ItemPlusConfig.GetTypeAndGrade(_theTpye, _tagItem.levelMax);
|
| | | int _beyond = _tagItem_A.upExpTotal - _tagItem_B.upExpTotal + strengthengmodel._EqInfo[_number].Proficiency;
|
| | | _FillAText.text = string.Format(Language.Get("Z1016"), _beyond);
|
| | | //// _FillAText.text = string.Format(Language.Get("Z1016"), strengthengmodel._EqInfo[_number].Proficiency);
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// //ItemPlusConfig _tagItem_A = ItemPlusConfig.GetTypeAndGrade(_theTpye, strengthengmodel._EqInfo[_number].EquipPartStarLV);
|
| | | //// //ItemPlusConfig _tagItem_B = ItemPlusConfig.GetTypeAndGrade(_theTpye, _tagItem.levelMax);
|
| | | //// //int _beyond = _tagItem_A.upExpTotal - _tagItem_B.upExpTotal + strengthengmodel._EqInfo[_number].Proficiency;
|
| | | //// _FillAText.text = string.Format(Language.Get("Z1016"), _beyond);
|
| | |
|
| | | }
|
| | | }
|
| | | //// }
|
| | | //// }
|
| | |
|
| | | void StrengtheningA(int _tag)//强化面板的赋值
|
| | | {
|
| | | TheningFloor.color = new Color32(255, 255, 255, 255);
|
| | | ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _tag);
|
| | | NowIteemCell.Init(item);
|
| | | ItemConfig tagItem = ItemConfig.Get(item.itemId.ToString());
|
| | | //// void StrengtheningA(int _tag)//强化面板的赋值
|
| | | //// {
|
| | | //// TheningFloor.color = new Color32(255, 255, 255, 255);
|
| | | //// ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _tag);
|
| | | //// NowIteemCell.Init(item);
|
| | | //// ItemConfig tagItem = ItemConfig.Get(item.itemId.ToString());
|
| | |
|
| | | NowIteemCell.cellBtn.RemoveAllListeners();
|
| | | NowIteemCell.cellBtn.AddListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Equip, item.guid, false);
|
| | | itemTipsModel.curAttrData.SetStrengthData(strengthengmodel.StrengthenTheCeiling(item.itemPlace) + 1, strengthengmodel.GameDefineIndex(item.itemPlace
|
| | | ));
|
| | | itemTipsModel.ShowUICtrl();
|
| | | });
|
| | | //当前阶
|
| | | UpIteemCell.Init(item);
|
| | | UpIteemCell.cellBtn.RemoveAllListeners();
|
| | | UpIteemCell.cellBtn.AddListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Equip, item.guid);
|
| | | });
|
| | | int _levelNum = strengthengmodel._EqInfo[_tag].EquipPartStarLV;//获取服务端的当前等级
|
| | | int _strType = strengthengmodel.GameDefineIndex(_tag);
|
| | | ;//强化类型返回
|
| | | ItemPlusConfig _tagItem = ItemPlusConfig.GetTypeAndGrade(_strType, _levelNum);
|
| | | if (_ToggleDown)
|
| | | {
|
| | | _SmoothSlider.delay = 0f;
|
| | | _SmoothSlider.stage = _levelNum;
|
| | | _SmoothSlider.ResetStage();
|
| | | _SmoothSlider.value = (float)Math.Round((double)strengthengmodel._EqInfo[_tag].Proficiency / _tagItem.upExpNeed, 2, MidpointRounding.AwayFromZero);
|
| | | _ToggleDown = false;
|
| | | }
|
| | | else
|
| | | {
|
| | | if (_levelNum > _StrengthenLevel)
|
| | | {
|
| | | if (EffectsJudgment(_tag))
|
| | | _UIEffect1B.Play();
|
| | | _StrengthenLevel = _levelNum;
|
| | | }
|
| | | _SmoothSlider.delay = _Delaytime;
|
| | | _SmoothSlider.stage = _levelNum;
|
| | | _SmoothSlider.value = (float)Math.Round((double)strengthengmodel._EqInfo[_tag].Proficiency / _tagItem.upExpNeed, 2, MidpointRounding.AwayFromZero);
|
| | | }
|
| | | //// NowIteemCell.cellBtn.RemoveAllListeners();
|
| | | //// NowIteemCell.cellBtn.AddListener(() =>
|
| | | //// {
|
| | | //// itemTipsModel.SetItemTipsModel(PackType.Equip, item.guid, false);
|
| | | //// itemTipsModel.curAttrData.SetStrengthData(strengthengmodel.StrengthenTheCeiling(item.itemPlace) + 1, strengthengmodel.GameDefineIndex(item.itemPlace
|
| | | //// ));
|
| | | //// itemTipsModel.ShowUICtrl();
|
| | | //// });
|
| | | //// //当前阶
|
| | | //// UpIteemCell.Init(item);
|
| | | //// UpIteemCell.cellBtn.RemoveAllListeners();
|
| | | //// UpIteemCell.cellBtn.AddListener(() =>
|
| | | //// {
|
| | | //// itemTipsModel.SetItemTipsModel(PackType.Equip, item.guid);
|
| | | //// });
|
| | | //// int _levelNum = strengthengmodel._EqInfo[_tag].EquipPartStarLV;//获取服务端的当前等级
|
| | | //// int _strType = strengthengmodel.GameDefineIndex(_tag);
|
| | | //// ;//强化类型返回
|
| | | //// //ItemPlusConfig _tagItem = ItemPlusConfig.GetTypeAndGrade(_strType, _levelNum);
|
| | | //// if (_ToggleDown)
|
| | | //// {
|
| | | //// _SmoothSlider.delay = 0f;
|
| | | //// _SmoothSlider.stage = _levelNum;
|
| | | //// _SmoothSlider.ResetStage();
|
| | | //// _SmoothSlider.value = (float)Math.Round((double)strengthengmodel._EqInfo[_tag].Proficiency / _tagItem.upExpNeed, 2, MidpointRounding.AwayFromZero);
|
| | | //// _ToggleDown = false;
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// if (_levelNum > _StrengthenLevel)
|
| | | //// {
|
| | | //// if (EffectsJudgment(_tag))
|
| | | //// _UIEffect1B.Play();
|
| | | //// _StrengthenLevel = _levelNum;
|
| | | //// }
|
| | | //// _SmoothSlider.delay = _Delaytime;
|
| | | //// _SmoothSlider.stage = _levelNum;
|
| | | //// _SmoothSlider.value = (float)Math.Round((double)strengthengmodel._EqInfo[_tag].Proficiency / _tagItem.upExpNeed, 2, MidpointRounding.AwayFromZero);
|
| | | //// }
|
| | |
|
| | | _gradText.text = _levelNum.ToString();//当前等级赋值
|
| | | GradeTextNext.text = (_levelNum + 1).ToString();//下级等级赋值
|
| | | _moneyText.text = MoneyContrast(_money);
|
| | | //// _gradText.text = _levelNum.ToString();//当前等级赋值
|
| | | //// GradeTextNext.text = (_levelNum + 1).ToString();//下级等级赋值
|
| | | //// _moneyText.text = MoneyContrast(_money);
|
| | |
|
| | | _sliderText.text = strengthengmodel._EqInfo[_tag].Proficiency.ToString() + "/" + _tagItem.upExpNeed.ToString();
|
| | | //// _sliderText.text = strengthengmodel._EqInfo[_tag].Proficiency.ToString() + "/" + _tagItem.upExpNeed.ToString();
|
| | |
|
| | | if (_tagItem.attType.Split('|').Length == 1)
|
| | | {
|
| | | Dictionary<int, int> _dicOne = AsStipulated((int)item.itemId);
|
| | | PlayerPropertyConfig _playPM = PlayerPropertyConfig.Get(_tagItem.attType);
|
| | | if (ItemPlusConfig.GetTypeAndGrade(_strType, _levelNum + 1) == null)
|
| | | return;
|
| | | ItemPlusConfig _tagItemA = ItemPlusConfig.GetTypeAndGrade(_strType, _levelNum + 1);
|
| | | m_DefenseText.gameObject.SetActive(false);
|
| | | m_LifeValueText.gameObject.SetActive(false);
|
| | | m_AttText.gameObject.SetActive(true);
|
| | | m_AttText.text = string.Format(Language.Get("Z1060"), _playPM.Name, int.Parse(_tagItem.attValue) + _dicOne[67], int.Parse(_tagItem.attValue) + _dicOne[68]);
|
| | | m_AttNum.text = string.Format(Language.Get("Strengthen_ValueNum"), int.Parse(_tagItemA.attValue) - int.Parse(_tagItem.attValue));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_AttText.gameObject.SetActive(false);
|
| | | m_DefenseText.gameObject.SetActive(true);
|
| | | m_LifeValueText.gameObject.SetActive(true);
|
| | | //// if (_tagItem.attType.Split('|').Length == 1)
|
| | | //// {
|
| | | //// Dictionary<int, int> _dicOne = AsStipulated((int)item.itemId);
|
| | | //// PlayerPropertyConfig _playPM = PlayerPropertyConfig.Get(_tagItem.attType);
|
| | | //// if (ItemPlusConfig.GetTypeAndGrade(_strType, _levelNum + 1) == null)
|
| | | //// return;
|
| | | //// ItemPlusConfig _tagItemA = ItemPlusConfig.GetTypeAndGrade(_strType, _levelNum + 1);
|
| | | //// m_DefenseText.gameObject.SetActive(false);
|
| | | //// m_LifeValueText.gameObject.SetActive(false);
|
| | | //// m_AttText.gameObject.SetActive(true);
|
| | | //// m_AttText.text = string.Format(Language.Get("Z1060"), _playPM.Name, int.Parse(_tagItem.attValue) + _dicOne[67], int.Parse(_tagItem.attValue) + _dicOne[68]);
|
| | | //// m_AttNum.text = string.Format(Language.Get("Strengthen_ValueNum"), int.Parse(_tagItemA.attValue) - int.Parse(_tagItem.attValue));
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// m_AttText.gameObject.SetActive(false);
|
| | | //// m_DefenseText.gameObject.SetActive(true);
|
| | | //// m_LifeValueText.gameObject.SetActive(true);
|
| | |
|
| | | Dictionary<int, int> _dicTwo = AsStipulated((int)item.itemId);
|
| | | string[] _str = new string[] { };
|
| | | string[] _strA = new string[] { };
|
| | | _str = _tagItem.attType.Split('|');
|
| | | _strA = _tagItem.attValue.Split('|');
|
| | | PlayerPropertyConfig _playPMA = PlayerPropertyConfig.Get(_str[0]);
|
| | | if (ItemPlusConfig.GetTypeAndGrade(_strType, _levelNum + 1) == null)
|
| | | return;
|
| | | ItemPlusConfig _tagItemB = ItemPlusConfig.GetTypeAndGrade(_strType, _levelNum + 1);
|
| | | string[] _strB = new string[] { };
|
| | | string[] _strB1 = new string[] { };
|
| | | _strB = _tagItemB.attType.Split('|');
|
| | | _strB1 = _tagItemB.attValue.Split('|');
|
| | | m_DefenseText.text = string.Format(Language.Get("Z1061"), _playPMA.Name, int.Parse(_strA[0]) + _dicTwo[6]);
|
| | | m_DefenseNum.text = string.Format(Language.Get("Strengthen_ValueNum"), int.Parse(_strB1[0]) - int.Parse(_strA[0]));
|
| | | PlayerPropertyConfig _playPMB = PlayerPropertyConfig.Get(_str[1]);
|
| | | m_LifeValueText.text = string.Format(Language.Get("Z1061"), _playPMB.Name, int.Parse(_strA[1]) + _dicTwo[8]);
|
| | | m_LifeValueNum.text = string.Format(Language.Get("Strengthen_ValueNum"), int.Parse(_strB1[1]) - int.Parse(_strA[1]));
|
| | | Array.Clear(_str, 0, _str.Length);
|
| | | Array.Clear(_strA, 0, _strA.Length);
|
| | | Array.Clear(_strB, 0, _strB.Length);
|
| | | Array.Clear(_strB1, 0, _strB1.Length);
|
| | | }
|
| | | }
|
| | | //// Dictionary<int, int> _dicTwo = AsStipulated((int)item.itemId);
|
| | | //// string[] _str = new string[] { };
|
| | | //// string[] _strA = new string[] { };
|
| | | //// _str = _tagItem.attType.Split('|');
|
| | | //// _strA = _tagItem.attValue.Split('|');
|
| | | //// PlayerPropertyConfig _playPMA = PlayerPropertyConfig.Get(_str[0]);
|
| | | //// if (ItemPlusConfig.GetTypeAndGrade(_strType, _levelNum + 1) == null)
|
| | | //// return;
|
| | | //// ItemPlusConfig _tagItemB = ItemPlusConfig.GetTypeAndGrade(_strType, _levelNum + 1);
|
| | | //// string[] _strB = new string[] { };
|
| | | //// string[] _strB1 = new string[] { };
|
| | | //// _strB = _tagItemB.attType.Split('|');
|
| | | //// _strB1 = _tagItemB.attValue.Split('|');
|
| | | //// m_DefenseText.text = string.Format(Language.Get("Z1061"), _playPMA.Name, int.Parse(_strA[0]) + _dicTwo[6]);
|
| | | //// m_DefenseNum.text = string.Format(Language.Get("Strengthen_ValueNum"), int.Parse(_strB1[0]) - int.Parse(_strA[0]));
|
| | | //// PlayerPropertyConfig _playPMB = PlayerPropertyConfig.Get(_str[1]);
|
| | | //// m_LifeValueText.text = string.Format(Language.Get("Z1061"), _playPMB.Name, int.Parse(_strA[1]) + _dicTwo[8]);
|
| | | //// m_LifeValueNum.text = string.Format(Language.Get("Strengthen_ValueNum"), int.Parse(_strB1[1]) - int.Parse(_strA[1]));
|
| | | //// Array.Clear(_str, 0, _str.Length);
|
| | | //// Array.Clear(_strA, 0, _strA.Length);
|
| | | //// Array.Clear(_strB, 0, _strB.Length);
|
| | | //// Array.Clear(_strB1, 0, _strB1.Length);
|
| | | //// }
|
| | | //// }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | Dictionary<int, int> AsStipulated(int _id)//获取物品表的属性值
|
| | | {
|
| | | Dictionary<int, int> _dic = new Dictionary<int, int>();
|
| | | ItemConfig tagCIM = ItemConfig.Get(_id);
|
| | | if (tagCIM.Effect1 != 0)
|
| | | {
|
| | | _dic.Add(tagCIM.Effect1, tagCIM.EffectValueA1);
|
| | | }
|
| | | if (tagCIM.Effect2 != 0)
|
| | | {
|
| | | _dic.Add(tagCIM.Effect2, tagCIM.EffectValueA2);
|
| | | }
|
| | | if (tagCIM.Effect3 != 0)
|
| | | {
|
| | | _dic.Add(tagCIM.Effect3, tagCIM.EffectValueA3);
|
| | | }
|
| | | if (tagCIM.Effect4 != 0)
|
| | | {
|
| | | _dic.Add(tagCIM.Effect4, tagCIM.EffectValueA4);
|
| | | }
|
| | | if (tagCIM.Effect5 != 0)
|
| | | {
|
| | | _dic.Add(tagCIM.Effect5, tagCIM.EffectValueA5);
|
| | | }
|
| | | if (_dic.Count == 0)
|
| | | return null;
|
| | | return _dic;
|
| | | }
|
| | | //// Dictionary<int, int> AsStipulated(int _id)//获取物品表的属性值
|
| | | //// {
|
| | | //// Dictionary<int, int> _dic = new Dictionary<int, int>();
|
| | | //// ItemConfig tagCIM = ItemConfig.Get(_id);
|
| | | //// if (tagCIM.Effect1 != 0)
|
| | | //// {
|
| | | //// _dic.Add(tagCIM.Effect1, tagCIM.EffectValueA1);
|
| | | //// }
|
| | | //// if (tagCIM.Effect2 != 0)
|
| | | //// {
|
| | | //// _dic.Add(tagCIM.Effect2, tagCIM.EffectValueA2);
|
| | | //// }
|
| | | //// if (tagCIM.Effect3 != 0)
|
| | | //// {
|
| | | //// _dic.Add(tagCIM.Effect3, tagCIM.EffectValueA3);
|
| | | //// }
|
| | | //// if (tagCIM.Effect4 != 0)
|
| | | //// {
|
| | | //// _dic.Add(tagCIM.Effect4, tagCIM.EffectValueA4);
|
| | | //// }
|
| | | //// if (tagCIM.Effect5 != 0)
|
| | | //// {
|
| | | //// _dic.Add(tagCIM.Effect5, tagCIM.EffectValueA5);
|
| | | //// }
|
| | | //// if (_dic.Count == 0)
|
| | | //// return null;
|
| | | //// return _dic;
|
| | | //// }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | public void ClearToArray()//关于数组的清空赋值
|
| | | {
|
| | | _wear.Clear();
|
| | | _notWear.Clear();
|
| | | _fullLevel.Clear();
|
| | | Array.Clear(_locationSort, 0, _locationSort.Length);
|
| | | for (int i = 0; i < _content.childCount; i++)
|
| | | {
|
| | | _content.GetChild(i).GetComponent<Toggle>().isOn = false;
|
| | | }
|
| | | }
|
| | | //// public void ClearToArray()//关于数组的清空赋值
|
| | | //// {
|
| | | //// _wear.Clear();
|
| | | //// _notWear.Clear();
|
| | | //// _fullLevel.Clear();
|
| | | //// Array.Clear(_locationSort, 0, _locationSort.Length);
|
| | | //// for (int i = 0; i < _content.childCount; i++)
|
| | | //// {
|
| | | //// _content.GetChild(i).GetComponent<Toggle>().isOn = false;
|
| | | //// }
|
| | | //// }
|
| | |
|
| | |
|
| | | void EventResponse(bool _bool, int _equipped)//按钮绑定的事件响应
|
| | | {
|
| | | if (_bool)
|
| | | {
|
| | | _ToggleDown = true;
|
| | | StopBtn();//停止强化
|
| | | _tag = _equipped;
|
| | | _StrengtheningType = strengthengmodel.GameDefineIndex(_tag);//获取强化类型
|
| | | ColrToPitchUp(_equipped);
|
| | | _StrengthenLevel = strengthengmodel._EqInfo[_equipped].EquipPartStarLV;//得到部位强化等级
|
| | | int _locationIndex = SwitchControl(_equipped);
|
| | | if (_locationIndex == 1)
|
| | | {
|
| | | StrengtheningA(_equipped);
|
| | | _GridGreenImage.gameObject.SetActive(true);
|
| | | m_ImageBGObj.SetActive(false);
|
| | | _AttributesBig.gameObject.SetActive(false);
|
| | | _GridGreenB.gameObject.SetActive(false);
|
| | | if (!_UIEffect1D.IsPlaying)
|
| | | {
|
| | | _UIEffect1D.Play();
|
| | | }
|
| | | }
|
| | | else if (_locationIndex == 2)
|
| | | {
|
| | | _GridGreenImage.gameObject.SetActive(false);
|
| | | TheningFloor.color = new Color32(255, 255, 255, 0);
|
| | | m_ImageBGObj.SetActive(true);
|
| | | _AttributesBig.gameObject.SetActive(true);
|
| | | _GridGreenB.gameObject.SetActive(false);
|
| | | _UIEffect1D.StopImediatly();
|
| | | _UIEffect1C.StopImediatly();
|
| | | _UIEffect1A.StopImediatly();
|
| | | _UIEffect1B.StopImediatly();
|
| | | }
|
| | | else if (_locationIndex == 3)
|
| | | {
|
| | | FullLevel(_equipped);
|
| | | _GridGreenImage.gameObject.SetActive(false);
|
| | | m_ImageBGObj.SetActive(false);
|
| | | _AttributesBig.gameObject.SetActive(false);
|
| | | _GridGreenB.gameObject.SetActive(true);
|
| | | DisplayPromoteLv(_equipped);
|
| | | _UIEffect1D.StopImediatly();
|
| | | _UIEffect1C.StopImediatly();
|
| | | _UIEffect1A.StopImediatly();
|
| | | _UIEffect1B.StopImediatly();
|
| | | }
|
| | | }
|
| | | }
|
| | | //// void EventResponse(bool _bool, int _equipped)//按钮绑定的事件响应
|
| | | //// {
|
| | | //// if (_bool)
|
| | | //// {
|
| | | //// _ToggleDown = true;
|
| | | //// StopBtn();//停止强化
|
| | | //// _tag = _equipped;
|
| | | //// _StrengtheningType = strengthengmodel.GameDefineIndex(_tag);//获取强化类型
|
| | | //// ColrToPitchUp(_equipped);
|
| | | //// _StrengthenLevel = strengthengmodel._EqInfo[_equipped].EquipPartStarLV;//得到部位强化等级
|
| | | //// int _locationIndex = SwitchControl(_equipped);
|
| | | //// if (_locationIndex == 1)
|
| | | //// {
|
| | | //// StrengtheningA(_equipped);
|
| | | //// _GridGreenImage.gameObject.SetActive(true);
|
| | | //// m_ImageBGObj.SetActive(false);
|
| | | //// _AttributesBig.gameObject.SetActive(false);
|
| | | //// _GridGreenB.gameObject.SetActive(false);
|
| | | //// if (!_UIEffect1D.IsPlaying)
|
| | | //// {
|
| | | //// _UIEffect1D.Play();
|
| | | //// }
|
| | | //// }
|
| | | //// else if (_locationIndex == 2)
|
| | | //// {
|
| | | //// _GridGreenImage.gameObject.SetActive(false);
|
| | | //// TheningFloor.color = new Color32(255, 255, 255, 0);
|
| | | //// m_ImageBGObj.SetActive(true);
|
| | | //// _AttributesBig.gameObject.SetActive(true);
|
| | | //// _GridGreenB.gameObject.SetActive(false);
|
| | | //// _UIEffect1D.StopImediatly();
|
| | | //// _UIEffect1C.StopImediatly();
|
| | | //// _UIEffect1A.StopImediatly();
|
| | | //// _UIEffect1B.StopImediatly();
|
| | | //// }
|
| | | //// else if (_locationIndex == 3)
|
| | | //// {
|
| | | //// FullLevel(_equipped);
|
| | | //// _GridGreenImage.gameObject.SetActive(false);
|
| | | //// m_ImageBGObj.SetActive(false);
|
| | | //// _AttributesBig.gameObject.SetActive(false);
|
| | | //// _GridGreenB.gameObject.SetActive(true);
|
| | | //// DisplayPromoteLv(_equipped);
|
| | | //// _UIEffect1D.StopImediatly();
|
| | | //// _UIEffect1C.StopImediatly();
|
| | | //// _UIEffect1A.StopImediatly();
|
| | | //// _UIEffect1B.StopImediatly();
|
| | | //// }
|
| | | //// }
|
| | | //// }
|
| | |
|
| | | void DisplayPromoteLv(int _index)
|
| | | {
|
| | | var itemModel = playerPack.GetItemByIndex(PackType.Equip, _index);
|
| | | if (itemModel != null)
|
| | | {
|
| | | var itemConfig = ItemConfig.Get(itemModel.itemId);
|
| | | var type = strengthengmodel.GameDefineIndex(_index);
|
| | | if (ItemPlusMaxConfig.GetItemPlusMaxLv(type) > itemConfig.LV)
|
| | | {
|
| | | var nextLv = itemConfig.LV + 1;
|
| | | m_PromoteLimit.text = Language.Get("ItemPlusPromoteLimit", nextLv);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PromoteLimit.text = string.Empty;
|
| | | }
|
| | | }
|
| | | }
|
| | | //// void DisplayPromoteLv(int _index)
|
| | | //// {
|
| | | //// var itemModel = playerPack.GetItemByIndex(PackType.Equip, _index);
|
| | | //// if (itemModel != null)
|
| | | //// {
|
| | | //// var itemConfig = ItemConfig.Get(itemModel.itemId);
|
| | | //// var type = strengthengmodel.GameDefineIndex(_index);
|
| | | //// if (ItemPlusMaxConfig.GetItemPlusMaxLv(type) > itemConfig.LV)
|
| | | //// {
|
| | | //// var nextLv = itemConfig.LV + 1;
|
| | | //// m_PromoteLimit.text = Language.Get("ItemPlusPromoteLimit", nextLv);
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// m_PromoteLimit.text = string.Empty;
|
| | | //// }
|
| | | //// }
|
| | | //// }
|
| | |
|
| | |
|
| | | void ColrToPitchUp(int _equipped)//颜色变化的切换
|
| | | {
|
| | | Transform _tran = _content.transform.Find(_toggleName[_equipped] + "/ContentText").transform;
|
| | | _tran.GetComponent<Text>().color = new Color32(255, 250, 240, 255);
|
| | | for (int i = 1; i <= 10; i++)
|
| | | {
|
| | | if (_equipped == i)
|
| | | continue;
|
| | | Transform _tranA = _content.transform.Find(_toggleName[i] + "/ContentText").transform;
|
| | | _tranA.GetComponent<Text>().color = new Color32(236, 215, 174, 255);
|
| | | }
|
| | | }
|
| | | //// void ColrToPitchUp(int _equipped)//颜色变化的切换
|
| | | //// {
|
| | | //// Transform _tran = _content.transform.Find(_toggleName[_equipped] + "/ContentText").transform;
|
| | | //// _tran.GetComponent<Text>().color = new Color32(255, 250, 240, 255);
|
| | | //// for (int i = 1; i <= 10; i++)
|
| | | //// {
|
| | | //// if (_equipped == i)
|
| | | //// continue;
|
| | | //// Transform _tranA = _content.transform.Find(_toggleName[i] + "/ContentText").transform;
|
| | | //// _tranA.GetComponent<Text>().color = new Color32(236, 215, 174, 255);
|
| | | //// }
|
| | | //// }
|
| | |
|
| | |
|
| | | void EquipPartStar(HA3B3_tagMCEquipPartStarLVInfo info)//服务器下发的数据初始化
|
| | | {
|
| | | SoundPlayer.Instance.PlayUIAudio(14);
|
| | | TheDynamicChange(_tag, strengthengmodel._EqInfo[_tag].EquipPartStarLV);//刷新等级和阶数
|
| | | StrengthenRefresh();//强化刷新
|
| | | Refresh();
|
| | | if (EffectsJudgment(_tag))
|
| | | {
|
| | | _UIEffect1A.Play();
|
| | | if (!_UIEffect1C.IsPlaying)
|
| | | {
|
| | | _UIEffect1C.Play();
|
| | | }
|
| | | //// void EquipPartStar(HA3B3_tagMCEquipPartStarLVInfo info)//服务器下发的数据初始化
|
| | | //// {
|
| | | //// SoundPlayer.Instance.PlayUIAudio(14);
|
| | | //// TheDynamicChange(_tag, strengthengmodel._EqInfo[_tag].EquipPartStarLV);//刷新等级和阶数
|
| | | //// StrengthenRefresh();//强化刷新
|
| | | //// Refresh();
|
| | | //// if (EffectsJudgment(_tag))
|
| | | //// {
|
| | | //// _UIEffect1A.Play();
|
| | | //// if (!_UIEffect1C.IsPlaying)
|
| | | //// {
|
| | | //// _UIEffect1C.Play();
|
| | | //// }
|
| | |
|
| | | }
|
| | | //// }
|
| | |
|
| | |
|
| | | }
|
| | | //// }
|
| | |
|
| | |
|
| | |
|
| | | void RefreshMoney(PlayerDataType _tCDBPlayerRefresh)
|
| | | {
|
| | | //// void RefreshMoney(PlayerDataType _tCDBPlayerRefresh)
|
| | | //// {
|
| | |
|
| | | switch (_tCDBPlayerRefresh)
|
| | | {
|
| | | case PlayerDataType.Silver:
|
| | | _money = PlayerDatas.Instance.baseData.allCopper;
|
| | | _moneyText.text = MoneyContrast(_money);
|
| | | m_Money_text.text = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3));
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | | }
|
| | | //// switch (_tCDBPlayerRefresh)
|
| | | //// {
|
| | | //// case PlayerDataType.Silver:
|
| | | //// _money = PlayerDatas.Instance.baseData.allCopper;
|
| | | //// _moneyText.text = MoneyContrast(_money);
|
| | | //// m_Money_text.text = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3));
|
| | | //// break;
|
| | | //// default:
|
| | | //// break;
|
| | | //// }
|
| | | //// }
|
| | |
|
| | |
|
| | | string MoneyContrast(ulong _haveMoney)//金钱对比
|
| | | {
|
| | | int _needMoney = 0;
|
| | | int _levelNumber = strengthengmodel._EqInfo[_tag].EquipPartStarLV;//获取服务端的当前等级
|
| | | ItemPlusConfig _tagItem = ItemPlusConfig.GetTypeAndGrade(_StrengtheningType, _levelNumber);
|
| | | _needMoney = _tagItem.costCount;
|
| | | string str = null;
|
| | | if (_haveMoney >= (ulong)_needMoney)
|
| | | {
|
| | | str = "<color=#fffaf0>" + (_needMoney / 10000).ToString() + Language.Get("Z1014") + "</color>";
|
| | | return str;
|
| | | }
|
| | | else
|
| | | {
|
| | | str = "<color=#ff0000>" + (_needMoney / 10000).ToString() + Language.Get("Z1014") + "</color>";
|
| | | return str;
|
| | | }
|
| | | }
|
| | | //// string MoneyContrast(ulong _haveMoney)//金钱对比
|
| | | //// {
|
| | | //// int _needMoney = 0;
|
| | | //// int _levelNumber = strengthengmodel._EqInfo[_tag].EquipPartStarLV;//获取服务端的当前等级
|
| | | //// ItemPlusConfig _tagItem = ItemPlusConfig.GetTypeAndGrade(_StrengtheningType, _levelNumber);
|
| | | //// _needMoney = _tagItem.costCount;
|
| | | //// string str = null;
|
| | | //// if (_haveMoney >= (ulong)_needMoney)
|
| | | //// {
|
| | | //// str = "<color=#fffaf0>" + (_needMoney / 10000).ToString() + Language.Get("Z1014") + "</color>";
|
| | | //// return str;
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// str = "<color=#ff0000>" + (_needMoney / 10000).ToString() + Language.Get("Z1014") + "</color>";
|
| | | //// return str;
|
| | | //// }
|
| | | //// }
|
| | |
|
| | |
|
| | | bool Judgment(int _number)//判断金钱是否足够能否强化
|
| | | {
|
| | | int _strType = strengthengmodel.GameDefineIndex(_number);// 化类型返回
|
| | | int _levelNumber = strengthengmodel._EqInfo[_number].EquipPartStarLV;//获取服务端的当前等级
|
| | | ItemPlusConfig _tagItem = ItemPlusConfig.GetTypeAndGrade(_strType, _levelNumber);
|
| | | if (_money >= (ulong)_tagItem.costCount)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | //// bool Judgment(int _number)//判断金钱是否足够能否强化
|
| | | //// {
|
| | | //// int _strType = strengthengmodel.GameDefineIndex(_number);// 化类型返回
|
| | | //// int _levelNumber = strengthengmodel._EqInfo[_number].EquipPartStarLV;//获取服务端的当前等级
|
| | | //// ItemPlusConfig _tagItem = ItemPlusConfig.GetTypeAndGrade(_strType, _levelNumber);
|
| | | //// if (_money >= (ulong)_tagItem.costCount)
|
| | | //// {
|
| | | //// return true;
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// return false;
|
| | | //// }
|
| | | //// }
|
| | |
|
| | | private void Refresh()
|
| | | {
|
| | | foreach (var key in strengthengmodel._EqInfo.Keys)
|
| | | {
|
| | | TheDynamicChange(key, strengthengmodel._EqInfo[key].EquipPartStarLV);
|
| | | }
|
| | | }
|
| | | //// private void Refresh()
|
| | | //// {
|
| | | //// foreach (var key in strengthengmodel._EqInfo.Keys)
|
| | | //// {
|
| | | //// TheDynamicChange(key, strengthengmodel._EqInfo[key].EquipPartStarLV);
|
| | | //// }
|
| | | //// }
|
| | |
|
| | | void TheDynamicChange(int _equippedWithA, int _equipmentLevel)//动态修改(装备位和装备等级)
|
| | | {
|
| | | ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _equippedWithA);
|
| | | if (item == null)
|
| | | return;
|
| | | //// void TheDynamicChange(int _equippedWithA, int _equipmentLevel)//动态修改(装备位和装备等级)
|
| | | //// {
|
| | | //// ItemModel item = playerPack.GetItemByIndex(PackType.Equip, _equippedWithA);
|
| | | //// if (item == null)
|
| | | //// return;
|
| | |
|
| | | Text _nameText = _content.Find(_toggleName[_equippedWithA] + "/ContentText").GetComponent<Text>();
|
| | | string str = null;
|
| | | ItemConfig _Item = ItemConfig.Get((int)item.itemId);
|
| | | ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | if (strengthengmodel.EquipMax(_equippedWithA) != 3)
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_equippedWithA), _Item.LV, _Item.ItemColor);
|
| | | }
|
| | | else
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_equippedWithA), 0, 0);
|
| | | }
|
| | | switch (_Item.ItemColor)
|
| | | {
|
| | | case 0:
|
| | | case 1:
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | break;
|
| | | case 2:
|
| | | //// Text _nameText = _content.Find(_toggleName[_equippedWithA] + "/ContentText").GetComponent<Text>();
|
| | | //// string str = null;
|
| | | //// ItemConfig _Item = ItemConfig.Get((int)item.itemId);
|
| | | //// ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | //// if (strengthengmodel.EquipMax(_equippedWithA) != 3)
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_equippedWithA), _Item.LV, _Item.ItemColor);
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_equippedWithA), 0, 0);
|
| | | //// }
|
| | | //// switch (_Item.ItemColor)
|
| | | //// {
|
| | | //// case 0:
|
| | | //// case 1:
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | //// _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// break;
|
| | | //// case 2:
|
| | |
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | break;
|
| | | case 3:
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | //// _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// break;
|
| | | //// case 3:
|
| | |
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | break;
|
| | | case 4:
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | //// _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// break;
|
| | | //// case 4:
|
| | |
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | break;
|
| | | case 5:
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | break;
|
| | | case 6:
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | | }
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | //// _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// break;
|
| | | //// case 5:
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | //// _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// break;
|
| | | //// case 6:
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, _equipmentLevel);
|
| | | //// _nameText.text = UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// break;
|
| | | //// default:
|
| | | //// break;
|
| | | //// }
|
| | | //// }
|
| | |
|
| | |
|
| | | int StrengthenTheCeiling(int _Max, int _equipmentLevel)//强化上限
|
| | | {
|
| | | if (_Max >= _equipmentLevel)
|
| | | return _equipmentLevel;
|
| | | else
|
| | | return _Max;
|
| | | }
|
| | | //// int StrengthenTheCeiling(int _Max, int _equipmentLevel)//强化上限
|
| | | //// {
|
| | | //// if (_Max >= _equipmentLevel)
|
| | | //// return _equipmentLevel;
|
| | | //// else
|
| | | //// return _Max;
|
| | | //// }
|
| | |
|
| | | string ItemColor(int ItemID, int _equipmentLevel)//颜色的赋值和装备强化等级
|
| | | {
|
| | | string str = null;
|
| | | ItemConfig _Item = ItemConfig.Get(ItemID);
|
| | | ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | if (strengthengmodel.EquipMax(_Item.EquipPlace) != 3)
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_Item.EquipPlace), _Item.LV, _Item.ItemColor);
|
| | | }
|
| | | else
|
| | | {
|
| | | //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_Item.EquipPlace), 0, 0);
|
| | | }
|
| | | switch (_Item.ItemColor)
|
| | | {
|
| | | case 0:
|
| | | case 1:
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | case 2:
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | case 3:
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | case 4:
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | case 5:
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | case 6:
|
| | | str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | default:
|
| | | return str;
|
| | | }
|
| | | }
|
| | | //// string ItemColor(int ItemID, int _equipmentLevel)//颜色的赋值和装备强化等级
|
| | | //// {
|
| | | //// string str = null;
|
| | | //// ItemConfig _Item = ItemConfig.Get(ItemID);
|
| | | //// ItemPlusMaxConfig _itemPM = new ItemPlusMaxConfig();
|
| | | //// if (strengthengmodel.EquipMax(_Item.EquipPlace) != 3)
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_Item.EquipPlace), _Item.LV, _Item.ItemColor);
|
| | | //// }
|
| | | //// else
|
| | | //// {
|
| | | //// //_itemPM = ItemPlusMaxConfig.GetEquipTypeAndPhaseColor(strengthengmodel.EquipMax(_Item.EquipPlace), 0, 0);
|
| | | //// }
|
| | | //// switch (_Item.ItemColor)
|
| | | //// {
|
| | | //// case 0:
|
| | | //// case 1:
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | //// return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// case 2:
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | //// return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// case 3:
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | //// return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// case 4:
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | //// return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// case 5:
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | //// return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// case 6:
|
| | | //// str = _Item.ItemName + " +" + StrengthenTheCeiling(_itemPM.levelMax, strengthengmodel._EqInfo[_equipmentLevel].EquipPartStarLV);
|
| | | //// return UIHelper.AppendStringColor(_Item.ItemColor, str, true);
|
| | | //// default:
|
| | | //// return str;
|
| | | //// }
|
| | | //// }
|
| | |
|
| | | void OnDisable()//界面关闭时调用
|
| | | {
|
| | | _open = false;
|
| | | StopBtn();//停止强化关闭携程
|
| | | StrengthenModel.Event_Ha3b3 -= EquipPartStar;//刷新服务器关于装备信息
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= RefreshMoney;//金钱的刷新
|
| | | WindowCenter.Instance.windowBeforeCloseEvent -= windowBeforeCloseEvent;
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | if (playerLv >= 150)
|
| | | {
|
| | | foreach (int key in strengthengmodel.StrengthengRedPoint.Keys)
|
| | | {
|
| | | strengthengmodel.StrengthengRedPoint[key].state = RedPointState.None;
|
| | | }
|
| | | //// void OnDisable()//界面关闭时调用
|
| | | //// {
|
| | | //// _open = false;
|
| | | //// StopBtn();//停止强化关闭携程
|
| | | //// StrengthenModel.Event_Ha3b3 -= EquipPartStar;//刷新服务器关于装备信息
|
| | | //// PlayerDatas.Instance.playerDataRefreshEvent -= RefreshMoney;//金钱的刷新
|
| | | //// WindowCenter.Instance.windowBeforeCloseEvent -= windowBeforeCloseEvent;
|
| | | //// int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | //// if (playerLv >= 150)
|
| | | //// {
|
| | | //// foreach (int key in strengthengmodel.StrengthengRedPoint.Keys)
|
| | | //// {
|
| | | //// strengthengmodel.StrengthengRedPoint[key].state = RedPointState.None;
|
| | | //// }
|
| | |
|
| | | if (strengthengmodel.LevelAstrictBool)
|
| | | {
|
| | | strengthengmodel.LevelAstrictBool = false;
|
| | | }
|
| | | strengthengmodel.equipmentA = 0;
|
| | | }
|
| | | }
|
| | | //// if (strengthengmodel.LevelAstrictBool)
|
| | | //// {
|
| | | //// strengthengmodel.LevelAstrictBool = false;
|
| | | //// }
|
| | | //// strengthengmodel.equipmentA = 0;
|
| | | //// }
|
| | | //// }
|
| | |
|
| | | }
|
| | | ////}
|