Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | {
|
| | | case SelectItemType.unfixed:
|
| | | matCell.SetDisplay(compoundModel, NeedMatType.unfixedItem, false, "", 0, itemIndex);
|
| | | IsComposeBind = ChangeFixedMatUI();
|
| | | IsComposeBind = false;
|
| | | break;
|
| | | case SelectItemType.addons:
|
| | | matCell.SetDisplay(compoundModel, NeedMatType.addItem, false, "", 0, itemIndex);
|
| | |
| | | case NeedMatType.unfixedItem:
|
| | | matCell.SetDisplay(compoundModel, matType, false,
|
| | | UIHelper.ReplaceNewLine(Language.Get("ComposeWin_PutInText_1")));
|
| | | IsComposeBind = ChangeFixedMatUI();
|
| | | IsComposeBind = false;
|
| | | break;
|
| | | case NeedMatType.addItem:
|
| | | matCell.SetDisplay(compoundModel, matType, false,
|
| | |
| | | UpdateComposeMat();
|
| | |
|
| | | composeItemSelectObj.SetActive(compoundModel.secondType < 4);
|
| | | }
|
| | |
|
| | | private bool ChangeFixedMatUI()
|
| | | {
|
| | | if (compoundModel == null) return false;
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(compoundModel.makeID);
|
| | | SinglePack singlePack = playerPack.GetSinglePack(packType);
|
| | | if (singlePack == null) return false;
|
| | |
|
| | | bool isBind = false;
|
| | | Dictionary<int,ItemModel> unfixedMatDict = selectModel.GetHaveUnfixedSelectItem();
|
| | | //foreach(var model in unfixedMatDict.Values)
|
| | | //{
|
| | | // if(model.isBind == 1)
|
| | | // {
|
| | | // isBind = true;
|
| | | // break;
|
| | | // }
|
| | | //}
|
| | | int[] fixedIds = compoundModel.itemID;
|
| | | int[] fixedCounts = compoundModel.itemCount;
|
| | | int[] fixedDisplays = compoundModel.itemDisplay;
|
| | | for (int i = 0; i < fixedDisplays.Length; i++)
|
| | | {
|
| | | var fixedDisplay = fixedDisplays[i];
|
| | | if (fixedDisplay != 0)
|
| | | {
|
| | | var matCell = fixedAndUnfixeds[fixedDisplay - 1];
|
| | | int fixedId = fixedIds[i];
|
| | | var bindIcon = matCell.itemCell.auctionIcon;
|
| | | bindIcon.gameObject.SetActive(false);
|
| | | //if (isBind)
|
| | | //{
|
| | | // var list= singlePack.GetItemsById(fixedId);
|
| | | // if (list != null)
|
| | | // {
|
| | | // for (int j = 0; j < list.Count; j++)
|
| | | // {
|
| | | // if (list[j].isBind == 1)
|
| | | // {
|
| | | // bindIcon.gameObject.SetActive(true);
|
| | | // break;
|
| | | // }
|
| | | // }
|
| | | // }
|
| | | //}
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | return isBind;
|
| | | }
|
| | |
|
| | | public int RefreshComposeSuccessRate(int initRate)
|
| | |
| | | public void Display(ItemModel model)
|
| | | {
|
| | | itemBaisc.Init(model);
|
| | | itemBaisc.auctionIcon.gameObject.SetActive(false);
|
| | | int strenLv = 0;
|
| | | if(model.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | {
|
| | |
| | | itemBaisc.stateIcon.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | itemBaisc.auctionIcon.gameObject.SetActive(false);
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | |
| | | nameTex.text = model.config.ItemName;
|
| | | nameTex.color = UIHelper.GetUIColor(model.config.ItemColor,true);
|
| | | itemBaisc.Init(model);
|
| | | itemBaisc.auctionIcon.gameObject.SetActive(false);
|
| | | int strenLv = 0;
|
| | | if (model.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | {
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, March 19, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class BagItemCell : CommonItemBaisc |
| | | { |
| | | Image m_AuctionIcon; |
| | | public Image auctionIcon { |
| | | get { |
| | | if (m_AuctionIcon == null) |
| | | { |
| | | m_AuctionIcon = this.transform.GetComponent<Image>("Img_Auction"); |
| | | } |
| | | return m_AuctionIcon; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化数据 bool值用来判断是否需要展示评分高低或者职业限制 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <param name="isCompare"></param> |
| | | public override void Init(ItemModel model, bool isCompare = false) |
| | | { |
| | | base.Init(model, isCompare); |
| | | auctionIcon.gameObject.SetActive(model.isAuction); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化数据(预览) |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | public override void Init(ItemCellModel model) |
| | | { |
| | | base.Init(model); |
| | | auctionIcon.gameObject.SetActive(false); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3271fd9e5f6ed824dabe85aa9aa004e5 |
| | | timeCreated: 1552982226 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | #endregion
|
| | |
|
| | | private SinglePack packModel;
|
| | | private ItemModel _clickItemModel;
|
| | | private bool isDoubleClick = false;
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel {
|
| | | get {
|
| | | return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | PackModel _playerPack;
|
| | | PackModel playerPack {
|
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
|
| | | }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
|
| | | private GridCell _lookEquipCell = null;
|
| | |
|
| | |
| | | {
|
| | | if (AchievementGoto.guideAchievementId != 0)
|
| | | {
|
| | | SuccessConfig successConfig = SuccessConfig.Get(AchievementGoto.guideAchievementId);
|
| | | var successConfig = SuccessConfig.Get(AchievementGoto.guideAchievementId);
|
| | | if (successConfig != null)
|
| | | {
|
| | | JumpUIType jump = (JumpUIType)successConfig.Jump;
|
| | | var jump = (JumpUIType)successConfig.Jump;
|
| | | switch (successConfig.Type)
|
| | | {
|
| | | case 94:
|
| | |
| | | {
|
| | | gridCell.itemCell.gameObject.SetActive(true);
|
| | | gridCell.itemCell.Init(itemModel, true);
|
| | | gridCell.itemCellBtn.OnOneParaClick = null;
|
| | | gridCell.itemCellBtn.m_OnDbClick = null;
|
| | | gridCell.itemCellBtn.onceClick = null;
|
| | | gridCell.itemCellBtn.doubleClick = null;
|
| | | if (KnapSackWin.titleType == KnapsackFuncTitle.depot)
|
| | | {
|
| | | gridCell.itemCellBtn.OnOneParaClick = (int info) =>
|
| | | gridCell.itemCellBtn.onceClick = (int info) =>
|
| | | {
|
| | |
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | |
| | | itemTipsModel.ShowUICtrl();
|
| | |
|
| | | };
|
| | | gridCell.itemCellBtn.m_OnDbClick = () =>
|
| | | gridCell.itemCellBtn.doubleClick = () =>
|
| | | {
|
| | | ItemOperateUtility.Instance.PutInWareHouse(itemModel.guid);
|
| | | };
|
| | |
| | | }
|
| | | else if (KnapSackWin.titleType == KnapsackFuncTitle.bag)
|
| | | {
|
| | | gridCell.itemCellBtn.OnOneParaClick = (int info) =>
|
| | | gridCell.itemCellBtn.onceClick = (int info) =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.EventSystems;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | public class ButtonExtend : ButtonEx
|
| | | {
|
| | | public int intInfo = 0;
|
| | | //public bool OnListen { get; set; }
|
| | | public Action<int> OnOneParaClick;
|
| | |
|
| | | public Action<int> onceClick;
|
| | |
|
| | | public override void OnPointerClick(PointerEventData eventData)
|
| | | {
|
| | | base.OnPointerClick(eventData);
|
| | | if (OnCheckDbClick())
|
| | | if (IsDoubleClick())
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (OnOneParaClick != null) OnOneParaClick(intInfo);
|
| | | if (onceClick != null) onceClick(intInfo);
|
| | | }
|
| | |
|
| | | #region 双击
|
| | | private float dbInterval = 0.3f;
|
| | | private bool m_IsOnDb = false;
|
| | |
|
| | | private float doubleClickInterval = 0.3f;
|
| | | private bool m_IsOnDoubleClick = false;
|
| | | private bool m_FreezeDbClick = false;
|
| | | public Action m_OnDbClick;
|
| | | private bool OnCheckDbClick()
|
| | | public Action doubleClick;
|
| | |
|
| | | private bool IsDoubleClick()
|
| | | {
|
| | | if (m_OnDbClick == null)
|
| | | if (doubleClick == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | if (m_IsOnDb)
|
| | |
|
| | | if (m_IsOnDoubleClick)
|
| | | {
|
| | | if (!m_FreezeDbClick)
|
| | | {
|
| | | m_OnDbClick();
|
| | | m_IsOnDb = false;
|
| | | doubleClick();
|
| | | m_IsOnDoubleClick = false;
|
| | | m_FreezeDbClick = true;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_FreezeDbClick = false;
|
| | | m_IsOnDb = true;
|
| | | m_IsOnDoubleClick = true;
|
| | | }
|
| | | TimeMgr.Instance.Register(this, OnDbCallback, dbInterval);
|
| | |
|
| | | TimeMgr.Instance.Register(this, OnDoubleClickCallback, doubleClickInterval);
|
| | | return true;
|
| | | }
|
| | |
|
| | | private void OnDbCallback(Component comp)
|
| | | private void OnDoubleClickCallback(Component comp)
|
| | | {
|
| | | if (!m_FreezeDbClick)
|
| | | {
|
| | | if (OnOneParaClick != null) OnOneParaClick(intInfo);
|
| | | if (onceClick != null) onceClick(intInfo);
|
| | | }
|
| | |
|
| | | m_FreezeDbClick = false;
|
| | | m_IsOnDb = false;
|
| | | m_IsOnDoubleClick = false;
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public enum ItemCellformat
|
| | | {
|
| | | Format_84x84,
|
| | | Format_80x80,
|
| | | Format_70x70,
|
| | | Format_64x64,
|
| | | None,
|
| | | }
|
| | |
|
| | | public class CommonItemBaisc : MonoBehaviour
|
| | | {
|
| | | [SerializeField] ItemCellformat m_Format;
|
| | | public ItemCellformat format { get { return m_Format; } set { m_Format = value; } }
|
| | |
|
| | | Image m_BgIcon;
|
| | | public Image bgIcon {
|
| | | get {
|
| | | if (m_BgIcon == null)
|
| | | {
|
| | | m_BgIcon = this.transform.GetComponent<Image>("EquipBG");
|
| | | LoadPrefab();
|
| | | m_BgIcon = this.transform.GetComponent<Image>("Container_ItemCell/Img_BackGround");
|
| | | }
|
| | | return m_BgIcon;
|
| | | }
|
| | |
| | | get {
|
| | | if (m_ItemIcon == null)
|
| | | {
|
| | | m_ItemIcon = this.transform.GetComponent<Image>("ItemIcon");
|
| | | LoadPrefab();
|
| | | m_ItemIcon = this.transform.GetComponent<Image>("Container_ItemCell/Img_Icon");
|
| | | }
|
| | | return m_ItemIcon;
|
| | | }
|
| | | }
|
| | |
|
| | | Image m_AuctionIcon;
|
| | | public Image auctionIcon {
|
| | | get {
|
| | | if (m_AuctionIcon == null)
|
| | | {
|
| | | m_AuctionIcon = this.transform.GetComponent<Image>("Img_Auction");
|
| | | }
|
| | | return m_AuctionIcon;
|
| | | }
|
| | | }
|
| | |
|
| | | Image m_StateIcon;
|
| | | public Image stateIcon {
|
| | | get {
|
| | | if (m_StateIcon == null)
|
| | | {
|
| | | m_StateIcon = this.transform.GetComponent<Image>("stateIcon");
|
| | | LoadPrefab();
|
| | | m_StateIcon = this.transform.GetComponent<Image>("Container_ItemCell/Img_State");
|
| | | }
|
| | | return m_StateIcon;
|
| | | }
|
| | |
| | | get {
|
| | | if (m_CountText == null)
|
| | | {
|
| | | m_CountText = this.transform.GetComponent<Text>("CountText");
|
| | | LoadPrefab();
|
| | | m_CountText = this.transform.GetComponent<Text>("Container_ItemCell/Txt_Count");
|
| | | }
|
| | | return m_CountText;
|
| | | }
|
| | |
| | | get {
|
| | | if (m_Button == null)
|
| | | {
|
| | | m_Button = this.GetComponent<Button>();
|
| | | LoadPrefab();
|
| | | m_Button = this.GetComponent<Button>("Container_ItemCell");
|
| | | }
|
| | | return m_Button;
|
| | | }
|
| | | }
|
| | |
|
| | | public int itemId { get; private set; }
|
| | | GameObject cellContainer;
|
| | | protected void LoadPrefab()
|
| | | {
|
| | | if (cellContainer == null)
|
| | | {
|
| | | switch (format)
|
| | | {
|
| | | case ItemCellformat.Format_64x64:
|
| | | cellContainer = UIUtility.CreateWidget("ItemCell_64", "Container_ItemCell");
|
| | | break;
|
| | | case ItemCellformat.Format_70x70:
|
| | | cellContainer = UIUtility.CreateWidget("ItemCell_70", "Container_ItemCell");
|
| | | break;
|
| | | case ItemCellformat.Format_80x80:
|
| | | cellContainer = UIUtility.CreateWidget("ItemCell_80", "Container_ItemCell");
|
| | | break;
|
| | | case ItemCellformat.Format_84x84:
|
| | | cellContainer = UIUtility.CreateWidget("ItemCell_84", "Container_ItemCell");
|
| | | break;
|
| | | }
|
| | |
|
| | | if (cellContainer != null)
|
| | | {
|
| | | cellContainer.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | cellContainer.transform.SetAsFirstSibling();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public int itemId { get; private set; }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | |
|
| | |
| | | bgIcon.gameObject.SetActive(true);
|
| | | itemIcon.SetSprite(config.IconKey);
|
| | | bgIcon.SetItemBackGround(ItemLogicUtility.Instance.GetItemQuality(itemId, useDataDic));
|
| | |
|
| | | auctionIcon.gameObject.SetActive(isAuction);
|
| | |
|
| | | countText.gameObject.SetActive(count > 1);
|
| | | if (count > 1)
|
| | |
| | | gridCell.itemCell.gameObject.SetActive(true);
|
| | | //pdr ToDo
|
| | | gridCell.itemCell.Init(itemModel, true);
|
| | | gridCell.itemCellBtn.OnOneParaClick = null;
|
| | | gridCell.itemCellBtn.m_OnDbClick = null;
|
| | | gridCell.itemCellBtn.OnOneParaClick=(int info)=>
|
| | | gridCell.itemCellBtn.onceClick = null;
|
| | | gridCell.itemCellBtn.doubleClick = null;
|
| | | gridCell.itemCellBtn.onceClick=(int info)=>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Warehouse,itemModel.guid,false,true);
|
| | | itemTipsModel.SetDepotTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | };
|
| | | gridCell.itemCellBtn.m_OnDbClick = () =>
|
| | | gridCell.itemCellBtn.doubleClick = () =>
|
| | | {
|
| | | ItemOperateUtility.Instance.TakeOutFromWarehouse(ItemOperateType.putOut, itemModel.guid);
|
| | | };
|
| | |
| | | {
|
| | | public class GridCell : MonoBehaviour
|
| | | {
|
| | | private ItemCell _itemCell;
|
| | | public ItemCell itemCell {
|
| | | private BagItemCell _itemCell;
|
| | | public BagItemCell itemCell {
|
| | | get
|
| | | {
|
| | | if(_itemCell == null)
|
| | | _itemCell = transform.Find("ItemCell").GetComponent<ItemCell>();
|
| | | _itemCell = transform.Find("ItemCell").GetComponent<BagItemCell>();
|
| | | return _itemCell;
|
| | | }
|
| | | }
|
| | |
| | | public Image cdImag {get { return _cdImage ?? (_cdImage = transform.Find("CDImag").GetComponent<Image>()); }}
|
| | |
|
| | | private ButtonExtend _itemCellBtn;
|
| | | public ButtonExtend itemCellBtn { get { return _itemCellBtn ?? (_itemCellBtn = transform.Find("ItemCell").GetComponent<ButtonExtend>()); } }
|
| | | public ButtonExtend itemCellBtn { get { return _itemCellBtn ?? (_itemCellBtn = transform.Find("ItemCell/Container_ItemCell").GetComponent<ButtonExtend>()); } }
|
| | |
|
| | | private Button _lockBtn;
|
| | | public Button lockBtn { get { return _lockBtn ?? (_lockBtn = transform.Find("GridLock").GetComponent<Button>()); } }
|
| | |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | private ItemModel itemModel = null;
|
| | |
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
|
| | | public void SetModel(ItemModel itemModel)
|
| | | {
|
| | |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class ItemCell : CommonItemBaisc |
| | | { |
| | | private Button m_Reducebtn; |
| | |
| | | get { |
| | | if (m_Reducebtn == null) |
| | | { |
| | | m_Reducebtn = this.transform.GetComponent<Button>("Reducebtn"); |
| | | LoadPrefab(); |
| | | m_Reducebtn = this.transform.GetComponent<Button>("Container_ItemCell/Btn_Reduce"); |
| | | } |
| | | return m_Reducebtn; |
| | | } |
| | |
| | | [SerializeField] UIEffect m_EffectBoss;
|
| | | [SerializeField] UIEffect m_EffectBase;
|
| | | [SerializeField] UIEffect m_EffectCover;
|
| | | [SerializeField] UIEffect m_EffectBossWord;
|
| | |
|
| | | [SerializeField, Header("小境界升级特效时长")] float m_NormalLevelUpEffectTime = 1.5f;
|
| | | [SerializeField, Header("大境界升级特效时长")] float m_SpecialLevelUpEffectTime = 4.5f;
|
| | |
| | | {
|
| | | isPlayingBossEffect = true;
|
| | | m_EffectBoss.Play();
|
| | | m_EffectBossWord.Play();
|
| | | Animator animator = null;
|
| | | if (m_EffectBoss.target != null)
|
| | | {
|
| | |
| | |
|
| | | void DisplayBase()
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel - 1);
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | var fightPower = PlayerDatas.Instance.baseData.FightPoint;
|
| | | var satisfy = fightPower >= config.FightPower;
|
| | | var label = UIHelper.AppendColor(satisfy ? TextColType.LightGreen : TextColType.Red, fightPower.ToString());
|
| | |
| | |
|
| | | void DisplayBoss()
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel - 1);
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | m_RawBoss.gameObject.SetActive(true);
|
| | | UI3DModelExhibition.Instance.ShowNPC(m_RawBoss, new UI3DNPCExhibitionData()
|
| | | {
|
| | |
| | | public void DisplayBoss(int realmLevel)
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel + 1);
|
| | | var label = UIHelper.GetRealmColorByLv(realmLevel, StringUtility.Contact("[", config.Name, "]"));
|
| | | var label = UIHelper.GetRealmColorByLv(realmLevel + 1, StringUtility.Contact("[", config.Name, "]"));
|
| | | m_Condition.text = Language.Get("RealmConditionBoss", label);
|
| | | var progress = model.isBossPass ? 1 : 0;
|
| | | m_Progress.text = StringUtility.Contact(progress, "/", 1);
|
| | |
| | | void DisplayRealmBoss()
|
| | | {
|
| | | m_ContainerBoss.gameObject.SetActive(true);
|
| | | m_RealmHeartMagic.Display(model.selectRealm);
|
| | | var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
|
| | | m_RealmHeartMagic.Display(realmLevel);
|
| | | }
|
| | |
|
| | | void HideRealmBoss()
|
| | |
| | | m_RealmLevelUp.Display(model.selectRealm);
|
| | | }
|
| | |
|
| | | m_GotoBoss.gameObject.SetActive(model.displayRealmLevel == model.selectRealm - 1 &&
|
| | | model.SatisfyChallengeBoss(model.selectRealm - 1));
|
| | | m_GotoBoss.gameObject.SetActive(model.SatisfyChallengeBoss(model.displayRealmLevel));
|
| | | }
|
| | |
|
| | | void DisplayRealmBrief()
|
| | |
| | | ItemModel itemModel = playerPack.GetItemByIndex(PackType.DogzItem, Index);
|
| | | m_ItemCell.Init(itemModel);
|
| | | m_ItemCell.countText.gameObject.SetActive(false);
|
| | | m_ItemCell.auctionIcon.gameObject.SetActive(false);
|
| | | var IudetDogzEquipPlus = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | TextNumber.gameObject.SetActive(false);
|
| | | if (IudetDogzEquipPlus != null)
|
| | |
| | | _ChildNodes._ItemIcon.SetActive(true);
|
| | | ItemModel model = playerPack.GetItemByIndex(PackType.Item, intPetAbsorbTyp[cellCount - 1]);
|
| | | _ChildNodes._ItemIcon.GetComponent<ItemCell>().Init(model);
|
| | | _ChildNodes._ItemButton.OnOneParaClick = null;
|
| | | _ChildNodes._ItemButton.onceClick = null;
|
| | | if (_DevourDIc.ContainsKey(intPetAbsorbTyp[cellCount - 1]))
|
| | | {
|
| | | _ChildNodes._Elect.SetActive(true);
|
| | |
|
| | | }
|
| | |
|
| | | _ChildNodes._ItemButton.OnOneParaClick = (int info) =>
|
| | | _ChildNodes._ItemButton.onceClick = (int info) =>
|
| | | {
|
| | | if (_ChildNodes._Elect.activeSelf)
|
| | | {
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, March 19, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | [ExecuteInEditMode] |
| | | [RequireComponent(typeof(RectTransform))] |
| | | public class UIPrefabLoader : MonoBehaviour |
| | | { |
| | | [SerializeField] string m_PrefabName; |
| | | public string prefabName { get { return m_PrefabName; } } |
| | | |
| | | GameObject instance; |
| | | |
| | | [ExecuteInEditMode] |
| | | private void Awake() |
| | | { |
| | | Create(); |
| | | } |
| | | |
| | | [ContextMenu("Create")] |
| | | public void Create() |
| | | { |
| | | if (instance != null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(m_PrefabName)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var find = this.transform.Find(m_PrefabName); |
| | | if (find) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | instance = UIUtility.CreateWidget(m_PrefabName, m_PrefabName); |
| | | instance.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: dabca296a3c10864b8107dca62b132e4 |
| | | timeCreated: 1552974474 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | {
|
| | | return string.Empty;
|
| | | }
|
| | | switch (config.Quality)
|
| | | {
|
| | | case 1:
|
| | | return StringUtility.Contact("<color=#", bright ? "686868" : "f7f7f7", ">", config.Name, "</color>");
|
| | | case 2:
|
| | | return StringUtility.Contact("<color=#", bright ? "08d00a" : "08d00a", ">", config.Name, "</color>");
|
| | | case 3:
|
| | | return StringUtility.Contact("<color=#", bright ? "006be3" : "31cefb", ">", config.Name, "</color>");
|
| | | case 4:
|
| | | return StringUtility.Contact("<color=#", bright ? "da48d5" : "ec4bf6", ">", config.Name, "</color>");
|
| | | case 5:
|
| | | return StringUtility.Contact("<color=#", bright ? "ff6701" : "f8983b", ">", config.Name, "</color>");
|
| | | case 6:
|
| | | return StringUtility.Contact("<color=#", bright ? "ff0303" : "ff0101", ">", config.Name, "</color>");
|
| | | case 7:
|
| | | return StringUtility.Contact("<color=#", bright ? "f6408d" : "ff7c7c", ">", config.Name, "</color>");
|
| | | case 8:
|
| | | return StringUtility.Contact("<color=#", bright ? "bb8800" : "ffde00", ">", config.Name, "</color>");
|
| | | case 9:
|
| | | return StringUtility.Contact("<color=#", bright ? "ff0303" : "ff0101", ">", config.Name, "</color>");
|
| | | default:
|
| | | return config.Name;
|
| | | }
|
| | | return GetRealmColorByLv(realmLv, config.Name, bright);
|
| | | }
|
| | |
|
| | | public static string GetRealmColorByLv(int realmLv, string msg, bool bright = false)
|
| | |
| | | switch (config.Quality)
|
| | | {
|
| | | case 1:
|
| | | return StringUtility.Contact("<color=#", bright ? "686868" : "f7f7f7", ">", msg, "</color>");
|
| | | return StringUtility.Contact("<color=#", bright ? "666666" : "dddddd", ">", msg, "</color>");
|
| | | case 2:
|
| | | return StringUtility.Contact("<color=#", bright ? "08d00a" : "08d00a", ">", msg, "</color>");
|
| | | return StringUtility.Contact("<color=#", bright ? "00b337" : "66ff00", ">", msg, "</color>");
|
| | | case 3:
|
| | | return StringUtility.Contact("<color=#", bright ? "006be3" : "31cefb", ">", msg, "</color>");
|
| | | return StringUtility.Contact("<color=#", bright ? "0066ff" : "00c6ff", ">", msg, "</color>");
|
| | | case 4:
|
| | | return StringUtility.Contact("<color=#", bright ? "da48d5" : "ec4bf6", ">", msg, "</color>");
|
| | | return StringUtility.Contact("<color=#", bright ? "ff00f6" : "f000ff", ">", msg, "</color>");
|
| | | case 5:
|
| | | return StringUtility.Contact("<color=#", bright ? "ff6701" : "f8983b", ">", msg, "</color>");
|
| | | return StringUtility.Contact("<color=#", bright ? "ff6600" : "ff9000", ">", msg, "</color>");
|
| | | case 6:
|
| | | return StringUtility.Contact("<color=#", bright ? "ff0303" : "ff0101", ">", msg, "</color>");
|
| | | case 7:
|
| | | return StringUtility.Contact("<color=#", bright ? "f6408d" : "ff7c7c", ">", msg, "</color>");
|
| | | case 8:
|
| | | return StringUtility.Contact("<color=#", bright ? "bb8800" : "ffde00", ">", msg, "</color>");
|
| | | case 9:
|
| | | return StringUtility.Contact("<color=#", bright ? "ff0303" : "ff0101", ">", msg, "</color>");
|
| | | return StringUtility.Contact("<color=#", bright ? "ff0000" : "ff0000", ">", msg, "</color>");
|
| | | default:
|
| | | return msg;
|
| | | }
|