500 子 【武将】武将时装 / 【武将】武将时装-客户端
7 文件已复制
1个文件已删除
1 文件已重命名
8个文件已添加
27个文件已修改
| New file |
| | |
| | | using System.Collections.Generic;
|
| | |
|
| | | public partial class HeroConfig : ConfigBase<int, HeroConfig>
|
| | | {
|
| | | static Dictionary<int, int> skinIDToHeroIDDict = new Dictionary<int, int>();
|
| | |
|
| | | protected override void OnConfigParseCompleted()
|
| | | {
|
| | | if (PlayerCanUse == 0) return;
|
| | | for (int i = 0; i < SkinIDList.Length; i++)
|
| | | {
|
| | | skinIDToHeroIDDict.Add(SkinIDList[i], HeroID);
|
| | | }
|
| | | }
|
| | |
|
| | | public static int GetHeroIDBySkinID(int skinID)
|
| | | {
|
| | | if (skinIDToHeroIDDict.ContainsKey(skinID))
|
| | | {
|
| | | return skinIDToHeroIDDict[skinID];
|
| | | }
|
| | | return 0;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/Config/PartialConfigs/HeroConfig.cs.meta
| File was copied from Main/SDK/ynmbxxjUtil.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d69a5f50b06dc814ea13cb20acd59e3a |
| | | guid: 602823eff16549445a1e5b1d324a9953 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using System.Collections.Generic;
|
| | |
|
| | | public partial class HeroSkinAttrConfig : ConfigBase<int, HeroSkinAttrConfig>
|
| | | {
|
| | |
|
| | | public static List<int> itemIdList = new List<int>();
|
| | | |
| | | protected override void OnConfigParseCompleted()
|
| | | {
|
| | | itemIdList.Add(NeedItemID);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/Config/PartialConfigs/HeroSkinAttrConfig.cs.meta
| File was copied from Main/SDK/ynmbxxjUtil.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d69a5f50b06dc814ea13cb20acd59e3a |
| | | guid: 09344e2dfddc7e14f97bc871ecb8630a |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | firstLaunch = true; |
| | | UnityEngine.Debug.Log("开始拷贝builtin资源"); |
| | | SDKUtils.Instance.CopyAsset(1); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin_assetbundle"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin_assetbundle.manifest"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/musics"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/musics.manifest"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/prefabs"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/prefabs.manifest"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/sprites"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/sprites.manifest"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/animationclips"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/animationclips.manifest"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/materials"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/materials.manifest"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/scriptableobjects"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/scriptableobjects.manifest"); |
| | | |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/font"); |
| | | //ynmbxxjUtil.Instance.CopyOneAsset("builtin/font.manifest"); |
| | | |
| | | //foreach (var config in ConfigInitiator.builtinConfig) |
| | | //{ |
| | | // ynmbxxjUtil.Instance.CopyOneAsset("config/" + config); |
| | | //} |
| | | |
| | | //AssetDeCompressTask.Decompress(ResourcesPath.Instance.ExternalStorePath); |
| | | //LocalSave.SetString("BuiltInAssetCopyCompleted_Android", VersionConfig.Get().version); |
| | | } |
| | | else |
| | | UnityEngine.Debug.Log("builtin资源已经拷贝过了"); |
| | |
| | | catch (Exception ex) |
| | | { |
| | | Debug.LogError(ex.Message + "\r\n" + ex.StackTrace); |
| | | OperationLogCollect.Instance.BugReportSys(ex.ToString(), "10001"); |
| | | Debug.LogErrorFormat("封包是否为Null:{0};", _package == null); |
| | | if (_package != null) |
| | | { |
| | |
| | | var iconConfig = IconConfig.Get(_iconKey); |
| | | if (iconConfig == null) |
| | | { |
| | | Debug.LogError("icon表未配置 " + _iconKey); |
| | | return null; |
| | | } |
| | | return ResManager.Instance.LoadAsset<Texture2D>(StringUtility.Concat(ResourcesPath.UI_TEXTURE_SUFFIX, "/" + iconConfig.folder), iconConfig.sprite); |
| | |
| | | |
| | | public void Init() |
| | | { |
| | | ynmbxxjUtil.Instance.Init(); // sdk临时用,后续新做SDK后删除 |
| | | Device = new DeviceInfo(); |
| | | string uid = LocalSave.GetString("Device_uniqueID"); |
| | | //Debug.Log(Math.Abs(System.Environment.TickCount)); |
| | |
| | | typeof(BoneFieldBattleWin), |
| | | typeof(TianziBillboradBattleWin), |
| | | typeof(WarlordPavilionBattleWin), |
| | | typeof(PreviewBattleWin), |
| | | }; |
| | | |
| | | // 战场名称 |
| | |
| | | public const string BoneBattleField = "BoneBattleField"; |
| | | public const string TianziBillboradBattleField = "TianziBillboradBattleField"; |
| | | public const string WarlordPavilionBattleField = "WarlordPavilionBattleField"; |
| | | public const string PriviewBattleField = "PriviewBattleField"; //预览战斗 |
| | | |
| | | public static Dictionary<string, string> battleNameToWinName = new Dictionary<string, string>() |
| | | { |
| | |
| | | { BoneBattleField, "BoneFieldBattleWin" }, |
| | | { TianziBillboradBattleField, "TianziBillboradBattleWin" }, |
| | | { WarlordPavilionBattleField, "WarlordPavilionBattleWin" }, |
| | | { PriviewBattleField, "PreviewBattleWin" }, |
| | | }; |
| | | |
| | | // 索引配置用 |
| | | public static Dictionary<string, int> FieldNameToIndex = new Dictionary<string, int>() |
| | | { |
| | | { StoryBossBattleField, 1 }, |
| | |
| | | { BoneBattleField, 3}, |
| | | { TianziBillboradBattleField, 4 }, |
| | | { WarlordPavilionBattleField, 5 }, |
| | | { PriviewBattleField, 6 }, |
| | | }; |
| | | |
| | | //和 CreateBattleField 里的对应 |
| | |
| | | {30010, BoneBattleField}, |
| | | {30020, TianziBillboradBattleField}, |
| | | {30030, WarlordPavilionBattleField}, |
| | | {30000, PriviewBattleField}, |
| | | }; |
| | | |
| | | //pvp战斗的战场,不在这个列表的视为pve类型的战场 |
| New file |
| | |
| | | using LitJson; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | |
| | | public class PriviewBattleField : BattleField |
| | | { |
| | | public PriviewBattleField(string _guid) : base(_guid) |
| | | { |
| | | |
| | | } |
| | | |
| | | public override void Init(int MapID, int FuncLineID, JsonData _extendData, |
| | | List<TeamBase> _redTeamList, List<TeamBase> _blueTeamList, byte turnMax) |
| | | { |
| | | base.Init(MapID, FuncLineID, extendData, _redTeamList, _blueTeamList, turnMax); |
| | | |
| | | SetBattleMode(BattleMode.Record); |
| | | } |
| | | |
| | | public override void AutoSetBattleMode() |
| | | { |
| | | SetBattleMode(BattleMode.Record); |
| | | } |
| | | |
| | | public override void TurnFightState(int TurnNum, int State, |
| | | uint FuncLineID, JsonData extendData) |
| | | { |
| | | base.TurnFightState(TurnNum, State, FuncLineID, extendData); |
| | | |
| | | } |
| | | |
| | | protected override void OnSettlement(JsonData turnFightStateData) |
| | | { |
| | | base.OnSettlement(turnFightStateData); |
| | | } |
| | | |
| | | public override void WhaleFall() |
| | | { |
| | | AutoFightModel.Instance.isPause = false; |
| | | Destroy(); |
| | | UIManager.Instance.CloseWindow<PreviewBattleWin>(); |
| | | } |
| | | |
| | | public override void Run() |
| | | { |
| | | if (operationAgent == null) |
| | | { |
| | | //防范异常 |
| | | return; |
| | | } |
| | | base.Run(); |
| | | } |
| | | |
| | | public override void DistributeNextPackage() |
| | | { |
| | | if (IsBattleFinish) |
| | | return; |
| | | |
| | | // 不要调用base的函数 |
| | | BattleManager.Instance.DistributeNextReportPackage(guid); |
| | | } |
| | | |
| | | public override void ShowWindow(HB424_tagSCTurnFightInit vNetData) |
| | | { |
| | | PreviewBattleWin fsBattleWin = UIManager.Instance.GetUI<PreviewBattleWin>();// as FullScreenBattleWin; |
| | | if (null == fsBattleWin) |
| | | { |
| | | fsBattleWin = UIManager.Instance.OpenWindow<PreviewBattleWin>(); |
| | | } |
| | | fsBattleWin.SetBattleField(this); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/System/Battle/BattleField/PriviewBattleField.cs.meta
| File was copied from Main/SDK/ynmbxxjUtil.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d69a5f50b06dc814ea13cb20acd59e3a |
| | | guid: 6a4e30cb7df89504c9c8cea06c35eed2 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | case 30030: |
| | | battleField = new WarlordPavilionBattleField(guid); |
| | | break; |
| | | case 30000: |
| | | battleField = new PriviewBattleField(guid); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| New file |
| | |
| | | |
| | | public class PreviewBattleWin : BaseBattleWin |
| | | { |
| | | string openUI = ""; |
| | | protected override void OnPreOpen() |
| | | { |
| | | base.OnPreOpen(); |
| | | UIManager.Instance.CloseWindow<MainWin>(); |
| | | if (UIManager.Instance.IsOpened<HeroTrainBaseWin>()) |
| | | { |
| | | UIManager.Instance.CloseWindow<HeroTrainBaseWin>(); |
| | | openUI = "HeroTrainBaseWin"; |
| | | } |
| | | |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | base.OnPreClose(); |
| | | if (!UIManager.Instance.IsOpened<MainWin>()) |
| | | UIManager.Instance.OpenWindow<MainWin>(); |
| | | |
| | | if (openUI == "HeroTrainBaseWin") |
| | | { |
| | | UIManager.Instance.OpenWindow<HeroTrainBaseWin>(2); |
| | | } |
| | | } |
| | | |
| | | protected override void OnClose() |
| | | { |
| | | base.OnClose(); |
| | | |
| | | TryPass(); |
| | | } |
| | | protected override void OnClickPass() |
| | | { |
| | | battleField.ForceFinish(); |
| | | TryPass(); |
| | | } |
| | | |
| | | |
| | | private void TryPass() |
| | | { |
| | | CloseWindow(); |
| | | BattleSettlementManager.Instance.WinShowOver(BattleConst.PriviewBattleField); |
| | | } |
| | | protected override void OnCreateBattleField(string guid, BattleField field) |
| | | { |
| | | if (field is PriviewBattleField) |
| | | { |
| | | SetBattleField(field); |
| | | } |
| | | } |
| | | |
| | | protected override void RefreshSpecific() |
| | | { |
| | | } |
| | | } |
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/System/Battle/PreviewBattleWin.cs.meta
| File was copied from Main/SDK/ynmbxxjUtil.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d69a5f50b06dc814ea13cb20acd59e3a |
| | | guid: 36a7f5e58370f5341838eb150f483bd1 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | roleLHModelTween.Play(); |
| | | roleLHModelTween2.SetStartState(); |
| | | roleLHModelTween2.Play(); |
| | | bgTexture.SetTexture2D("countryBG" + hero.Country); |
| | | bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(hero.SkinIDList[0], hero.Country)); |
| | | |
| | | HeroUIManager.Instance.PlayerLHSound(hero.SkinIDList[0]); |
| | | } |
| | |
| | | roleLHModelTween2.SetStartState(); |
| | | roleLHModelTween2.Play(); |
| | | |
| | | bgTexture.SetTexture2D("countryBG" + hero.Country); |
| | | bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(hero.SkinIDList[0], hero.Country)); |
| | | } |
| | | |
| | | void RefreshHeroInfo(int heroID) |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | public partial class HeroInfo |
| | | { |
| | | // 78 # 英雄使用的皮肤索引 |
| | | // 78 # 英雄使用的皮肤索引 (形象) |
| | | public int SkinIndex |
| | | { |
| | | get |
| | |
| | | } |
| | | } |
| | | |
| | | //属性生效的皮肤索引 |
| | | public int SkinAttrIndex |
| | | { |
| | | get |
| | | { |
| | | if (itemHero == null) |
| | | return 0; |
| | | return itemHero.GetUseDataFirstValue(82); |
| | | } |
| | | } |
| | | |
| | | public int SkinAttrID |
| | | { |
| | | get |
| | | { |
| | | return heroConfig.SkinIDList[SkinAttrIndex]; |
| | | } |
| | | } |
| | | |
| | | |
| | | public int GetHeroSkinValue(int attrType) |
| | | { |
| | | var cfg = HeroSkinAttrConfig.Get(SkinAttrID); |
| | | if (cfg == null) |
| | | return 0; |
| | | var index = Array.IndexOf(cfg.WearAttrIDList, attrType); |
| | | if (index == -1) |
| | | return 0; |
| | | return cfg.WearAttrValueList[index]; |
| | | } |
| | | |
| | | public int GetHeroSkinPer(int attrType) |
| | | { |
| | | var cfg = HeroSkinAttrConfig.Get(SkinAttrID); |
| | | if (cfg == null) |
| | | return 0; |
| | | |
| | | var _type = 0; |
| | | if (PlayerPropertyConfig.baseAttr2perDict.ContainsKey(attrType)) |
| | | { |
| | | _type = PlayerPropertyConfig.baseAttr2perDict[attrType]; |
| | | } |
| | | |
| | | var index = Array.IndexOf(cfg.WearAttrIDList, _type); |
| | | if (index == -1) |
| | | return 0; |
| | | return cfg.WearAttrValueList[index]; |
| | | } |
| | | } |
| | |
| | | } |
| | | HeroInfo heroInfo = nowMaxStarHeroDict[heroId]; |
| | | HeroUIManager.Instance.selectHeroGuid = heroInfo.itemHero.guid; |
| | | UIManager.Instance.OpenWindow<HeroTrainWin>(); |
| | | UIManager.Instance.OpenWindow<HeroTrainBaseWin>(); |
| | | } |
| | | else |
| | | { |
| | |
| | | public void Display() |
| | | { |
| | | heroConfig = HeroConfig.Get(HeroUIManager.Instance.selectForPreviewHeroID); |
| | | bgTexture.SetTexture2D("countryBG" + heroConfig.Country); |
| | | int skinID = heroConfig.SkinIDList[0]; |
| | | bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(skinID, heroConfig.Country)); |
| | | roleLhModel.Create(skinID, 1, motionName: "", isLh: true); |
| | | roleXsModel.Create(skinID, 1); |
| | | jobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(heroConfig.Class)); |
| | |
| | | heroCardBtn.AddListener(() => |
| | | { |
| | | HeroUIManager.Instance.selectHeroGuid = guid; |
| | | UIManager.Instance.OpenWindow<HeroTrainWin>(funcState == 3 ? 1 : 0); |
| | | UIManager.Instance.OpenWindow<HeroTrainBaseWin>(funcState == 3 ? 1 : 0); |
| | | }); |
| | | } |
| | | } |
| | |
| | | private void OnCloseWindow(UIBase closeUI) |
| | | { |
| | | //其他武将功能产生数据变化,需要刷新武将列表 |
| | | if (closeUI is HeroTrainWin || |
| | | if (closeUI is HeroTrainBaseWin || |
| | | closeUI is HeroCallWin || |
| | | closeUI is HeroDeleteWin || |
| | | closeUI is HeroPosWin) |
| New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | public class HeroSkinCell : CellView
|
| | | {
|
| | | [SerializeField] Image skinImage;
|
| | | [SerializeField] Image skinFrame;
|
| | | [SerializeField] Image skinAttrOnImg;
|
| | | [SerializeField] Image skinRoleOnImg;
|
| | | [SerializeField] Text skinName;
|
| | | [SerializeField] Image unselectImg;
|
| | | [SerializeField] Image ungetImg;
|
| | | [SerializeField] Image fakeRed;
|
| | | [SerializeField] Button cardBtn;
|
| | |
|
| | | public void Display(int heroID, int index, bool isHero)
|
| | | {
|
| | | var skinID = HeroConfig.Get(heroID).SkinIDList[index];
|
| | | var skinConfig = HeroSkinConfig.Get(skinID);
|
| | | skinImage.SetOrgSprite(skinConfig.CardPic, "HeroSkinCard");
|
| | | skinFrame.SetSprite("HeroSkinFrame" + skinConfig.Quality);
|
| | | skinName.text = skinConfig.SkinName == "" ? Language.Get("HeroSkin2") : skinConfig.SkinName;
|
| | | var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuid);
|
| | | if (!isHero)
|
| | | {
|
| | | skinAttrOnImg.SetActive(false);
|
| | | skinRoleOnImg.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | //分穿戴 和形象,选中同一个时穿戴优先
|
| | | skinAttrOnImg.SetActive(hero.SkinAttrIndex == index);
|
| | | skinRoleOnImg.SetActive(hero.SkinIndex != hero.SkinAttrIndex && hero.SkinIndex == index);
|
| | | }
|
| | | unselectImg.SetActive(HeroUIManager.Instance.selectSkinIndex != index);
|
| | | ungetImg.SetActive(!HeroUIManager.Instance.IsHeroSkinActive(heroID, skinID));
|
| | | fakeRed.SetActive(HeroUIManager.Instance.HeroSkinStateForRedpoint(skinID) > 0);
|
| | | cardBtn.AddListener(()=>
|
| | | {
|
| | | HeroUIManager.Instance.selectSkinIndex = index;
|
| | | });
|
| | | }
|
| | | }
|
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/System/HeroUI/HeroSkinCell.cs.meta
| File was copied from Main/SDK/ynmbxxjUtil.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d69a5f50b06dc814ea13cb20acd59e3a |
| | | guid: 834258ed4bb79f9468a4f083e753317f |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using System; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 武将皮肤 |
| | | /// </summary> |
| | | public class HeroSkinWin : UIBase |
| | | { |
| | | [SerializeField] RawImage bgTexture; |
| | | [SerializeField] Button showFuncBtn; //只显示立绘时点击,显示功能 |
| | | [SerializeField] Transform funcForm; |
| | | [SerializeField] UIHeroController roleLhModel; //展示英雄立绘 |
| | | [SerializeField] UIHeroController roleXsModel; //像素 |
| | | [SerializeField] Button seeLhBtn; //查看立绘 |
| | | [SerializeField] Button previewFightBtn; //预览战斗 |
| | | [SerializeField] Button shopBtn; //商店 |
| | | [SerializeField] Button changeClothBtn; //只更换服装外观 |
| | | [SerializeField] Text nameText; |
| | | [SerializeField] Text skinNameText; |
| | | // [SerializeField] Text skinLVText; |
| | | //属性区 |
| | | [SerializeField] Text[] onAttrText; //穿戴属性 |
| | | [SerializeField] Text[] allAttrText; //全体加成 |
| | | [SerializeField] Transform attrObj; |
| | | |
| | | [SerializeField] ScrollerController skinScroller; |
| | | [SerializeField] Button unlockBtn; |
| | | [SerializeField] Image itemIcon; |
| | | [SerializeField] Text itemCountText; |
| | | [SerializeField] Button putonBtn; |
| | | [SerializeField] GameObject putonYetObj; |
| | | [SerializeField] Button showGetObj; |
| | | [SerializeField] GameObject showNormalObj; |
| | | |
| | | |
| | | HeroConfig heroConfig; |
| | | int heroID; |
| | | int skinID; |
| | | public HeroInfo hero; |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | showFuncBtn.AddListener(() => |
| | | { |
| | | funcForm.SetActive(true); |
| | | if (hero != null) |
| | | { |
| | | UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 1; |
| | | } |
| | | }); |
| | | seeLhBtn.AddListener(() => |
| | | { |
| | | funcForm.SetActive(false); |
| | | if (hero != null) |
| | | { |
| | | UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 0; |
| | | } |
| | | }); |
| | | previewFightBtn.AddListener(() => |
| | | { |
| | | var config = HeroConfig.Get(heroID); |
| | | int index = Array.IndexOf(config.SkinIDList, skinID); |
| | | BattleManager.Instance.SendTurnFight(30000, valueList: new uint[] { (uint)heroID, (uint)index }); |
| | | }); |
| | | shopBtn.AddListener(() => |
| | | { |
| | | UIManager.Instance.OpenWindow<StoreBaseWin>(1); |
| | | }); |
| | | unlockBtn.AddListener(() => |
| | | { |
| | | UnLockSkin(); |
| | | }); |
| | | putonBtn.AddListener(() => |
| | | { |
| | | if (hero == null) |
| | | { |
| | | return; |
| | | } |
| | | HeroUIManager.Instance.SendSkinOP(heroID, skinID, 4, hero.itemHero.gridIndex); |
| | | }); |
| | | |
| | | showGetObj.AddListener(() => |
| | | { |
| | | showGetObj.SetActive(false); |
| | | showNormalObj.SetActive(true); |
| | | }); |
| | | } |
| | | |
| | | int activeSkinID; |
| | | protected override void OnPreOpen() |
| | | { |
| | | activeSkinID = 0; |
| | | skinScroller.OnRefreshCell += OnRefreshCell; |
| | | if (functionOrder == 0) |
| | | { |
| | | //代表从培养界面打开 |
| | | hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuid); |
| | | heroConfig = hero.heroConfig; |
| | | HeroUIManager.Instance.selectSkinIndex = hero.SkinIndex; |
| | | } |
| | | else |
| | | { |
| | | //从图鉴界面打开 |
| | | heroConfig = HeroConfig.Get(HeroUIManager.Instance.selectForPreviewHeroID); |
| | | HeroUIManager.Instance.selectSkinIndex = 0; |
| | | } |
| | | heroID = heroConfig.HeroID; |
| | | |
| | | HeroUIManager.Instance.OnSkinIndexChanged += OnSkinIndexChanged; |
| | | HeroUIManager.Instance.OnHeroCollectEvent += OnHeroCollectEvent; |
| | | PackManager.Instance.RefreshItemEvent += OnRefreshItemEvent; |
| | | |
| | | showGetObj.SetActive(false); |
| | | showNormalObj.SetActive(true); |
| | | |
| | | Display(); |
| | | CreateScroller(); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | hero = null; |
| | | skinScroller.OnRefreshCell -= OnRefreshCell; |
| | | HeroUIManager.Instance.OnSkinIndexChanged -= OnSkinIndexChanged; |
| | | HeroUIManager.Instance.OnHeroCollectEvent -= OnHeroCollectEvent; |
| | | PackManager.Instance.RefreshItemEvent -= OnRefreshItemEvent; |
| | | } |
| | | |
| | | public void Display() |
| | | { |
| | | skinID = heroConfig.SkinIDList[HeroUIManager.Instance.selectSkinIndex]; |
| | | bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(skinID, heroConfig.Country)); |
| | | roleLhModel.Create(skinID, 1, motionName: "", isLh: true); |
| | | roleXsModel.Create(skinID, 1); |
| | | HeroUIManager.Instance.PlayerLHSound(skinID); |
| | | nameText.text = heroConfig.Name; |
| | | skinNameText.text = HeroSkinConfig.Get(skinID).SkinName; |
| | | RefreshAttr(); |
| | | ShowBtns(); |
| | | } |
| | | |
| | | |
| | | |
| | | void RefreshAttr() |
| | | { |
| | | var cfg = HeroSkinAttrConfig.Get(skinID); |
| | | if (cfg == null) |
| | | { |
| | | attrObj.SetActive(false); |
| | | return; |
| | | } |
| | | attrObj.SetActive(true); |
| | | string format = "{0}" + UIHelper.AppendColor(TextColType.Green, "+{1}", false); |
| | | for (int i = 0; i < onAttrText.Length; i++) |
| | | { |
| | | if (i < cfg.WearAttrIDList.Length) |
| | | { |
| | | onAttrText[i].text = PlayerPropertyConfig.GetFullDescription(cfg.WearAttrIDList[i], cfg.WearAttrValueList[i], format); |
| | | } |
| | | else |
| | | { |
| | | onAttrText[i].text = ""; |
| | | } |
| | | } |
| | | |
| | | for (int i = 0; i < allAttrText.Length; i++) |
| | | { |
| | | if (i < cfg.RoleAttrIDList.Length) |
| | | { |
| | | allAttrText[i].text = PlayerPropertyConfig.GetFullDescription(cfg.RoleAttrIDList[i], cfg.RoleAttrValueList[i], format); |
| | | } |
| | | else |
| | | { |
| | | allAttrText[i].text = ""; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | void CreateScroller() |
| | | { |
| | | skinScroller.Refresh(); |
| | | for (int i = 0; i < heroConfig.SkinIDList.Length; i++) |
| | | { |
| | | skinScroller.AddCell(ScrollerDataType.Header, i); |
| | | } |
| | | skinScroller.Restart(); |
| | | if (HeroUIManager.Instance.selectSkinIndex > 2) |
| | | { |
| | | skinScroller.JumpIndex(HeroUIManager.Instance.selectSkinIndex - 1); |
| | | } |
| | | } |
| | | |
| | | void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | var _cell = cell as HeroSkinCell; |
| | | _cell.Display(heroID, cell.index, hero != null); |
| | | } |
| | | |
| | | void OnSkinIndexChanged() |
| | | { |
| | | Display(); |
| | | skinScroller.m_Scorller.RefreshActiveCellViews(); |
| | | } |
| | | |
| | | void OnHeroCollectEvent() |
| | | { |
| | | if (activeSkinID == skinID && HeroUIManager.Instance.IsHeroSkinActive(heroID, skinID)) |
| | | { |
| | | showGetObj.SetActive(true); |
| | | showNormalObj.SetActive(false); |
| | | Display(); |
| | | skinScroller.m_Scorller.RefreshActiveCellViews(); |
| | | activeSkinID = 0; |
| | | return; |
| | | } |
| | | } |
| | | |
| | | void OnRefreshItemEvent(PackType type, int index, int itemID) |
| | | { |
| | | if (type == PackType.Hero) |
| | | { |
| | | ShowBtns(); |
| | | skinScroller.m_Scorller.RefreshActiveCellViews(); |
| | | } |
| | | } |
| | | |
| | | void UnLockSkin() |
| | | { |
| | | var cfg = HeroSkinAttrConfig.Get(skinID); |
| | | if (cfg == null) |
| | | { |
| | | return; |
| | | } |
| | | if (!ItemLogicUtility.CheckItemCount(PackType.Item, cfg.NeedItemID, 1, 2)) |
| | | { |
| | | return; |
| | | } |
| | | activeSkinID = skinID; |
| | | HeroUIManager.Instance.SendSkinOP(heroID, skinID, 1); |
| | | } |
| | | |
| | | void ShowBtns() |
| | | { |
| | | if (hero == null) |
| | | { |
| | | putonBtn.SetActive(false); |
| | | putonYetObj.SetActive(false); |
| | | shopBtn.SetActive(false); |
| | | changeClothBtn.SetActive(false); |
| | | } |
| | | |
| | | if (!HeroUIManager.Instance.IsHeroSkinActive(heroID, skinID)) |
| | | { |
| | | var cfg = HeroSkinAttrConfig.Get(skinID); |
| | | if (cfg == null) |
| | | { |
| | | unlockBtn.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | unlockBtn.SetActive(true); |
| | | int itemID = cfg.NeedItemID; |
| | | itemIcon.SetItemSprite(itemID); |
| | | itemCountText.text = UIHelper.ShowUseItem(PackType.Item, itemID, 1, bright:false); |
| | | } |
| | | putonBtn.SetActive(false); |
| | | putonYetObj.SetActive(false); |
| | | return; |
| | | } |
| | | unlockBtn.SetActive(false); |
| | | |
| | | if (hero == null) return; |
| | | |
| | | putonBtn.SetActive(hero.SkinAttrID != skinID); |
| | | putonYetObj.SetActive(hero.SkinAttrID == skinID); |
| | | |
| | | |
| | | } |
| | | } |
| File was renamed from Main/SDK/ynmbxxjUtil.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d69a5f50b06dc814ea13cb20acd59e3a |
| | | guid: 43e5706b2aee0df459589c7482f9d8ad |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | // 武将功能界面 |
| | | public class HeroTrainBaseWin : OneLevelWin |
| | | { |
| | | |
| | | |
| | | protected override void OpenSubUIByTabIndex() |
| | | { |
| | | ShowSkinBtn(); |
| | | switch (functionOrder) |
| | | { |
| | | case 0: |
| | | |
| | | //培养 |
| | | if (UIManager.Instance.IsOpened<HeroTrainWin>()) |
| | | { |
| | | UIManager.Instance.CloseWindow<HeroTrainWin>(); |
| | | } |
| | | currentSubUI = UIManager.Instance.OpenWindow<HeroTrainWin>(); |
| | | |
| | | if (GetSortingOrder() < currentSubUI.GetSortingOrder()) |
| | | { |
| | | SetSortingOrder(currentSubUI.GetSortingOrder() + 1); |
| | | } |
| | | break; |
| | | case 1: |
| | | //突破 |
| | | if (UIManager.Instance.IsOpened<HeroTrainWin>()) |
| | | { |
| | | UIManager.Instance.CloseWindow<HeroTrainWin>(); |
| | | } |
| | | currentSubUI = UIManager.Instance.OpenWindow<HeroTrainWin>(1); |
| | | |
| | | if (GetSortingOrder() < currentSubUI.GetSortingOrder()) |
| | | { |
| | | SetSortingOrder(currentSubUI.GetSortingOrder() + 1); |
| | | } |
| | | break; |
| | | case 2: |
| | | //皮肤 |
| | | currentSubUI = UIManager.Instance.OpenWindow<HeroSkinWin>(); |
| | | |
| | | if (GetSortingOrder() < currentSubUI.GetSortingOrder()) |
| | | { |
| | | SetSortingOrder(currentSubUI.GetSortingOrder() + 1); |
| | | } |
| | | break; |
| | | default: |
| | | Debug.LogWarning("未知的标签索引: " + functionOrder); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | |
| | | //有的武将没有皮肤 |
| | | public void ShowSkinBtn() |
| | | { |
| | | if (string.IsNullOrEmpty(HeroUIManager.Instance.selectHeroGuid)) |
| | | { |
| | | return; |
| | | } |
| | | var config = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuid).heroConfig; |
| | | tabButtons[2].SetActive(config.SkinIDList.Length > 1); |
| | | } |
| | | |
| | | void LateUpdate() |
| | | { |
| | | if (currentSubUI == null) return; |
| | | if (GetSortingOrder() < currentSubUI.GetSortingOrder()) |
| | | { |
| | | SetSortingOrder(currentSubUI.GetSortingOrder() + 1); |
| | | } |
| | | } |
| | | } |
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/System/HeroUI/HeroTrainBaseWin.cs.meta
| File was copied from Main/SDK/ynmbxxjUtil.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d69a5f50b06dc814ea13cb20acd59e3a |
| | | guid: 0b3eddca22f174c448766192183bd9a2 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | // 区分突破和培养模块 |
| | | [SerializeField] HeroLVBreakCell heroLVBreakCell; //对应培养的 allAttrScroll 和 attrBtn |
| | | |
| | | [SerializeField] GroupButtonEx trainMainButton; //培养入口按钮 |
| | | [SerializeField] GroupButtonEx breakMainButton; //突破入口按钮 |
| | | |
| | | //入口伪红点用图片代替 |
| | | [SerializeField] Image trainMainRedImg; |
| | | [SerializeField] Image breakMainRedImg; |
| | |
| | | showFuncBtn.AddListener(() => |
| | | { |
| | | funcForm.SetActive(true); |
| | | UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 1; |
| | | }); |
| | | seeLhBtn.AddListener(() => |
| | | { |
| | | funcForm.SetActive(false); |
| | | UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 0; |
| | | }); |
| | | closeBtn.AddListener(CloseWindow); |
| | | rightBtn.AddListener(() => |
| | |
| | | freezeTipGo.SetActive(!freezeTipGo.activeSelf); |
| | | }); |
| | | |
| | | trainMainButton.AddListener(() => |
| | | { |
| | | functionOrder = 0; |
| | | DisplayTrainOrBreak(hero); |
| | | ForceRefreshLayout(); |
| | | }); |
| | | |
| | | breakMainButton.AddListener(() => |
| | | { |
| | | functionOrder = 1; |
| | | DisplayTrainOrBreak(hero); |
| | | unfoldState = false; |
| | | RefreshFoldState(); |
| | | }); |
| | | } |
| | | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | if (functionOrder == 0) |
| | | { |
| | | DisplayTrainOrBreak(hero); |
| | | ForceRefreshLayout(); |
| | | } |
| | | else if (functionOrder == 1) |
| | | { |
| | | DisplayTrainOrBreak(hero); |
| | | unfoldState = false; |
| | | RefreshFoldState(); |
| | | } |
| | | |
| | | |
| | | PackManager.Instance.RefreshItemLockEvent += RefreshItemLockEvent; |
| | | HeroManager.Instance.onHeroChangeEvent += RefreshHeroEvent; |
| | | UIManager.Instance.OnCloseWindow += OnCloseWindow; |
| | |
| | | |
| | | public void Display() |
| | | { |
| | | bgTexture.SetTexture2D("countryBG" + hero.heroConfig.Country); |
| | | bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(hero.SkinID, hero.heroConfig.Country)); |
| | | roleLhModel.Create(hero.SkinID, 1, motionName: "", isLh: true); |
| | | |
| | | roleXsModel.Create(hero.SkinID, 1); |
| | |
| | | { |
| | | resultIndex = 0; |
| | | } |
| | | guid = HeroUIManager.Instance.heroSortList[resultIndex]; |
| | | guid = HeroUIManager.Instance.selectHeroGuid = HeroUIManager.Instance.heroSortList[resultIndex]; |
| | | hero = HeroManager.Instance.GetHero(guid); |
| | | Display(); |
| | | |
| | | HeroUIManager.Instance.PlayerLHSound(hero.SkinID); |
| | | |
| | | //控制一级功能界面的皮肤按钮 |
| | | var ui = UIManager.Instance.GetUI<HeroTrainBaseWin>(); |
| | | if (ui != null) |
| | | { |
| | | ui.ShowSkinBtn(); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | heroLVBreakCell.SetActive(false); |
| | | allAttrScroll.SetActive(true); |
| | | attrBtn.SetActive(true); |
| | | trainMainButton.SelectBtn(); |
| | | } |
| | | else |
| | | { |
| | |
| | | attrBtn.SetActive(false); |
| | | |
| | | heroLVBreakCell.Display(hero); |
| | | breakMainButton.SelectBtn(); |
| | | } |
| | | } |
| | | |
| | |
| | | heroCollectInfoDic[(int)netPack.HeroInfoList[i].HeroID] = netPack.HeroInfoList[i]; |
| | | } |
| | | // allHeroBookPer = GetHeroCollectBookPer(); |
| | | OnHeroCollectEvent?.Invoke(); |
| | | UpdateHeroBookRedpoint(); |
| | | RefreshAllSkinAttr(); |
| | | OnHeroCollectEvent?.Invoke(); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | //分为0未获得、1可激活、2常规、3突破升级、4、星升级、5已满级 |
| | | //分为0未获得、1可激活、2常规、(3突破升级、4、星升级、5已满级 废弃功能保留逻辑) |
| | | public int GetHeroBookState(int heroID, int quality) |
| | | { |
| | | int funcState = 0; |
| | | |
| | | HB122_tagSCHeroInfo.tagSCHero colData; |
| | | TryGetHeroBookInfo(heroID, out colData); |
| | | // int maxBreakLV = colData.BookBreakLVH; //历史最高突破等级 |
| | | // int maxStarLV = colData.BookStarLVH; //历史最高星级 |
| | | |
| | | if (colData.BookInitState == 0) |
| | | { |
| | |
| | | // } |
| | | // return config.BookInitAddPer + heroData.BookStarLV * config.BookStarAddPer + heroData.BookBreakLV * config.BookBreakLVAddPer; |
| | | // } |
| | | |
| | | #region 皮肤 |
| | | //策划去除了升星功能 |
| | | //属性分穿戴(武将个体)和全体 |
| | | public Dictionary<int, long> allSkinAttrDic = new Dictionary<int, long>(); |
| | | int m_selectSkinIndex = 0; |
| | | public event Action OnSkinIndexChanged; |
| | | public int selectSkinIndex |
| | | { |
| | | get { return m_selectSkinIndex; } |
| | | set |
| | | { |
| | | m_selectSkinIndex = value; |
| | | OnSkinIndexChanged?.Invoke(); |
| | | } |
| | | } |
| | | |
| | | //全体属性 |
| | | public void RefreshAllSkinAttr() |
| | | { |
| | | allSkinAttrDic.Clear(); |
| | | foreach (var config in HeroSkinAttrConfig.GetValues()) |
| | | { |
| | | var heroID = HeroConfig.GetHeroIDBySkinID(config.SkinID); |
| | | if (!IsHeroSkinActive(heroID, config.SkinID)) |
| | | { |
| | | continue; |
| | | } |
| | | for (int i = 0; i < config.RoleAttrIDList.Length; i++) |
| | | { |
| | | if (!allSkinAttrDic.ContainsKey(config.RoleAttrIDList[i])) |
| | | { |
| | | allSkinAttrDic[config.RoleAttrIDList[i]] = 0; |
| | | } |
| | | allSkinAttrDic[config.RoleAttrIDList[i]] += config.RoleAttrValueList[i]; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public bool IsHeroSkinActive(int heroID, int skinID) |
| | | { |
| | | //默认皮肤返回true |
| | | if (HeroConfig.Get(heroID).SkinIDList[0] == skinID) |
| | | { |
| | | return true; |
| | | } |
| | | HB122_tagSCHeroInfo.tagSCHero colData; |
| | | TryGetHeroBookInfo(heroID, out colData); |
| | | |
| | | if (colData != null && colData.SkinList != null) |
| | | { |
| | | foreach (var data in colData.SkinList) |
| | | { |
| | | if (data.SkinID != skinID) |
| | | { |
| | | continue; |
| | | } |
| | | return data.State == 1; |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | public long GetSkinAttrValue(int attrID) |
| | | { |
| | | allSkinAttrDic.TryGetValue(attrID, out long value); |
| | | return value; |
| | | } |
| | | |
| | | public int GetSkinAttrPer(int attrID) |
| | | { |
| | | if (PlayerPropertyConfig.baseAttr2perDict.ContainsKey(attrID)) |
| | | { |
| | | var pertype = PlayerPropertyConfig.baseAttr2perDict[attrID]; |
| | | allSkinAttrDic.TryGetValue(pertype, out long value); |
| | | return (int)(value); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | //操作 1-激活;2-选择形象;4-选择属性 |
| | | public void SendSkinOP(int heroID, int skinID, int opType, int itemIndex = 0) |
| | | { |
| | | var pack = new CB236_tagCSHeroSkinOP(); |
| | | pack.HeroID = (uint)heroID; |
| | | pack.SkinID = (uint)skinID; |
| | | pack.OPType = (byte)opType; |
| | | pack.ItemIndex = (ushort)itemIndex; |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | |
| | |
| | | void OnLoginLoadOK() |
| | | { |
| | | UpdateHeroCardRedpoint(); |
| | | UpdateHeroCardSkinRedpoint(); |
| | | } |
| | | |
| | | private void OnHeroChangeEvent(HeroInfo hero) |
| | |
| | | } |
| | | |
| | | #region 武将UI常用接口 |
| | | |
| | | //获得武将背景图片名,如果没有配置默认用阵营图 |
| | | public string GetBGName(int skinID, int conutry) |
| | | { |
| | | var config = HeroSkinConfig.Get(skinID); |
| | | if (config != null && !string.IsNullOrEmpty(config.BG)) |
| | | { |
| | | return config.BG; |
| | | } |
| | | return "countryBG" + conutry; |
| | | } |
| | | public string GetCountryName(int index) |
| | | { |
| | | return RichTextMsgReplaceConfig.GetRichReplace("Country", index); |
| | |
| | | Redpoint heroEatRedPoint = new Redpoint(MainRedDot.HeroCardRedpoint, MainRedDot.HeroCardRedpoint * 10 + 8); |
| | | //新标识的红点 所有武将统一个 |
| | | Redpoint newMarkRedPoint = new Redpoint(MainRedDot.HeroCardRedpoint, MainRedDot.HeroCardRedpoint * 10 + 9); |
| | | //所有武将的皮肤功能一个红点 |
| | | Redpoint skinRedPoint = new Redpoint(MainRedDot.HeroCardRedpoint, MainRedDot.HeroCardRedpoint * 10 + 7); |
| | | void InitHeroOnTeamRedpointList() |
| | | { |
| | | heroOnTeamRedpointList.Clear(); |
| | |
| | | |
| | | } |
| | | |
| | | //武将列表的皮肤红点,图鉴皮肤红点另外函数刷新 |
| | | void UpdateHeroCardSkinRedpoint() |
| | | { |
| | | skinRedPoint.state = RedPointState.None; |
| | | var _list = HeroManager.Instance.GetHeroList(); |
| | | foreach (var hero in _list) |
| | | { |
| | | if (!hero.isAttrActive) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (HeroAllSkinStateForRedpoint(hero.heroId) == 1) |
| | | { |
| | | skinRedPoint.state = RedPointState.Simple; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | void InitHerosData() |
| | | { |
| | |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | if (HeroAllSkinStateForRedpoint(heroID, true) == 2) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | |
| | | redpoint.state = RedPointState.Simple; |
| | | continue; |
| | | } |
| | | |
| | | if (HeroAllSkinStateForRedpoint(heroID, true) == 2) |
| | | { |
| | | redpoint.state = RedPointState.Simple; |
| | | continue; |
| | | } |
| | | |
| | | redpoint.state = RedPointState.None; |
| | | } |
| | | } |
| | |
| | | { |
| | | refreshRedPoint = true; |
| | | } |
| | | |
| | | if (HeroSkinAttrConfig.itemIdList.Contains(itemID)) |
| | | { |
| | | UpdateHeroCardSkinRedpoint(); |
| | | } |
| | | |
| | | } |
| | | |
| | | void OnTeamChangeEvent(int teamType) |
| | |
| | | refreshRedPoint = true; |
| | | } |
| | | } |
| | | |
| | | |
| | | //单武将红点 只用于界面打开的时候独立使用 |
| | | public Redpoint trainRedpoint = new Redpoint(MainRedDot.HeroCardRedpoint * 100 + 1); |
| | | public Redpoint breakRedpoint = new Redpoint(MainRedDot.HeroCardRedpoint * 100 + 2); |
| | | public Redpoint skinRedpoint = new Redpoint(MainRedDot.HeroCardRedpoint * 100 + 3); |
| | | |
| | | |
| | | // public void UpdateHeroCardRedpoint() |
| | | // { |
| | | // trainRedpoint.state = RedPointState.None; |
| | | // breakRedpoint.state = RedPointState.None; |
| | | // skinRedpoint.state = RedPointState.None; |
| | | // } |
| | | |
| | | //指定皮肤红点状态 0-无 1-有武将红点影响武将列表红点(假红点) 2-无武将红点影响图鉴界面红点 |
| | | public int HeroSkinStateForRedpoint(int skinID, bool isBook = false) |
| | | { |
| | | HeroSkinAttrConfig skinAttrConfig = HeroSkinAttrConfig.Get(skinID); |
| | | if (skinAttrConfig == null) |
| | | { |
| | | return 0; |
| | | } |
| | | var heroID = HeroConfig.GetHeroIDBySkinID(skinAttrConfig.SkinID); |
| | | HB122_tagSCHeroInfo.tagSCHero colData; |
| | | TryGetHeroBookInfo(heroID, out colData); |
| | | |
| | | if (colData != null && colData.SkinList != null) |
| | | { |
| | | foreach (var data in colData.SkinList) |
| | | { |
| | | if (data.State != 0 && data.SkinID == skinAttrConfig.SkinID && data.Star >= skinAttrConfig.StarMax) |
| | | { |
| | | //满星 |
| | | return 0; |
| | | } |
| | | } |
| | | } |
| | | if (PackManager.Instance.GetItemCountByID(PackType.Item, skinAttrConfig.NeedItemID) == 0) |
| | | { |
| | | return 0; |
| | | } |
| | | if (!isBook) |
| | | { |
| | | //非图鉴调用的时候 |
| | | return 1; |
| | | } |
| | | if (HeroManager.Instance.GetHeroByID(heroID) != null) |
| | | { |
| | | return 1; |
| | | } |
| | | return 2; |
| | | } |
| | | |
| | | //指定武将的所有皮肤红点状态 0-无 1-有武将红点影响武将列表红点(假红点) 2-无武将红点影响图鉴界面红点 |
| | | int HeroAllSkinStateForRedpoint(int heroID, bool isBook = false) |
| | | { |
| | | var config = HeroConfig.Get(heroID); |
| | | for (int i = 0; i < config.SkinIDList.Length; i++) |
| | | { |
| | | var state = HeroSkinStateForRedpoint(config.SkinIDList[i], isBook); |
| | | if (isBook && state == 2) |
| | | { |
| | | return state; |
| | | } |
| | | else if (!isBook && state == 1) |
| | | { |
| | | return state; |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | |
| | | #region 等待服务端响应 |
| | |
| | | RechargeManager.Instance.selectTabIndex = index;
|
| | | if (UIManager.Instance.IsOpened<StoreBaseWin>())
|
| | | {
|
| | | UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(1);
|
| | | UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(2);
|
| | | }
|
| | | else
|
| | | {
|
| | | UIManager.Instance.OpenWindow<StoreBaseWin>(1);
|
| | | UIManager.Instance.OpenWindow<StoreBaseWin>(2);
|
| | | }
|
| | | break;
|
| | | case 3:
|
| | |
| | | RechargeManager.Instance.selectTabIndex = 1; |
| | | if (UIManager.Instance.IsOpened<StoreBaseWin>()) |
| | | { |
| | | UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(1); |
| | | UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(2); |
| | | } |
| | | else |
| | | { |
| | | UIManager.Instance.OpenWindow<StoreBaseWin>(1); |
| | | UIManager.Instance.OpenWindow<StoreBaseWin>(2); |
| | | } |
| | | } |
| | | } |
| | |
| | | RechargeManager.Instance.selectTabIndex = 0; |
| | | if (UIManager.Instance.IsOpened<StoreBaseWin>()) |
| | | { |
| | | UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(1); |
| | | UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(2); |
| | | } |
| | | else |
| | | { |
| | | UIManager.Instance.OpenWindow<StoreBaseWin>(1); |
| | | UIManager.Instance.OpenWindow<StoreBaseWin>(2); |
| | | } |
| | | } |
| | | } |
| | |
| | | var heroLVValue = hero.GetHeroLVValue(attrType); |
| | | |
| | | //武将皮肤 |
| | | var skinValue = 0; |
| | | var skinPer = 0; |
| | | var heroSkinValue = 0; |
| | | var skinValue = HeroUIManager.Instance.GetSkinAttrValue(attrType); |
| | | var skinPer = HeroUIManager.Instance.GetSkinAttrPer(attrType); |
| | | var heroSkinValue = hero.GetHeroSkinValue(attrType); |
| | | var heroSkinPer = hero.GetHeroSkinPer(attrType); |
| | | |
| | | |
| | | double value = (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+skinValue+dingjungeValue+minggeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+skinPer+cardPer+minggePer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue+heroSkinValue; |
| | |
| | | var fetterValue = hero.GetFetterAttrValue(attrType); |
| | | |
| | | //武将皮肤 |
| | | var heroSkinValue = 0; |
| | | var heroSkinValue = hero.GetHeroSkinValue(attrType); |
| | | var heroSkinPer = hero.GetHeroSkinPer(attrType); |
| | | |
| | | double value = (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)+(heroSelfValue+heroSkinValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue; |
| | | |
| | |
| | | { |
| | | HeroUIManager.Instance.SortHeroList(); |
| | | HeroUIManager.Instance.selectHeroGuid = guid; |
| | | UIManager.Instance.OpenWindow<HeroTrainWin>(); |
| | | UIManager.Instance.OpenWindow<HeroTrainBaseWin>(); |
| | | } |
| | | |
| | | void ClickEmpty() |
| | |
| | | private void OnCloseWindow(UIBase closeUI) |
| | | { |
| | | //其他武将功能产生数据变化,需要刷新武将列表 |
| | | if (closeUI is HeroTrainWin) |
| | | if (closeUI is HeroTrainBaseWin) |
| | | { |
| | | DisplayCard(TeamManager.Instance.GetMainTeamID()); |
| | | } |
| | |
| | | RechargeManager.Instance.selectTabIndex = 1; |
| | | if (UIManager.Instance.IsOpened<StoreBaseWin>()) |
| | | { |
| | | UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(1); |
| | | UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(2); |
| | | } |
| | | else |
| | | { |
| | | UIManager.Instance.OpenWindow<StoreBaseWin>(1); |
| | | UIManager.Instance.OpenWindow<StoreBaseWin>(2); |
| | | } |
| | | } |
| | | }); |
| | |
| | | UIManager.Instance.OpenWindow<WarlordPavilionFailWin>(); |
| | | } |
| | | break; |
| | | case BattleConst.PriviewBattleField: |
| | | UIManager.Instance.CloseWindow<PreviewBattleWin>(); |
| | | break; |
| | | default: |
| | | if (isWin) |
| | | { |
| New file |
| | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | public class SkinStoreWin : UIBase |
| | | { |
| | | [SerializeField] OwnMoneyCell ownMoneyCellWithShop; |
| | | //有刷新功能的商店 |
| | | [SerializeField] GameObject refreshGo; |
| | | [SerializeField] Image refreshMoneyIcon; |
| | | [SerializeField] Text refreshMoneyText; |
| | | [SerializeField] Button refreshButton; |
| | | |
| | | [SerializeField] GroupButtonEx normalShopBtn; |
| | | [SerializeField] GroupButtonEx guildShopBtn; |
| | | [SerializeField] GroupButtonEx heroShopBtn; |
| | | |
| | | [SerializeField] ScrollerController scroller; |
| | | |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | refreshButton.AddListener(RefreshStore); |
| | | normalShopBtn.AddListener(() => { OnSelectStoreFuncType(1); }); |
| | | guildShopBtn.AddListener(() => { OnSelectStoreFuncType(2); }); |
| | | heroShopBtn.AddListener(() => { OnSelectStoreFuncType(3); }); |
| | | } |
| | | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | scroller.OnRefreshCell += OnRefreshCell; |
| | | StoreModel.Instance.RefreshShopEvent += Display; |
| | | StoreModel.Instance.RefreshBuyShopLimitEvent += Display; |
| | | GuildManager.Instance.EnterOrQuitGuildEvent += EnterOrQuitGuildEvent; |
| | | |
| | | Display(); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | scroller.OnRefreshCell -= OnRefreshCell; |
| | | StoreModel.Instance.RefreshShopEvent -= Display; |
| | | StoreModel.Instance.RefreshBuyShopLimitEvent -= Display; |
| | | GuildManager.Instance.EnterOrQuitGuildEvent -= EnterOrQuitGuildEvent; |
| | | StoreModel.Instance.selectStoreFuncType = StoreFunc.Normal; |
| | | } |
| | | |
| | | void Display() |
| | | { |
| | | if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Normal) |
| | | { |
| | | normalShopBtn.SelectBtn(); |
| | | } |
| | | else if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Guild) |
| | | { |
| | | guildShopBtn.SelectBtn(); |
| | | } |
| | | else if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Hero) |
| | | { |
| | | heroShopBtn.SelectBtn(); |
| | | } |
| | | |
| | | guildShopBtn.SetColorful(null, PlayerDatas.Instance.fairyData.HasFairy); |
| | | guildShopBtn.isLock = !PlayerDatas.Instance.fairyData.HasFairy; |
| | | |
| | | ShowMoney(); |
| | | CreateScroller(); |
| | | } |
| | | |
| | | void EnterOrQuitGuildEvent(bool isEnter) |
| | | { |
| | | if (!isEnter && StoreModel.Instance.selectStoreFuncType == StoreFunc.Guild) |
| | | { |
| | | StoreModel.Instance.selectStoreFuncType = StoreFunc.Normal; |
| | | } |
| | | Display(); |
| | | } |
| | | |
| | | void CreateScroller() |
| | | { |
| | | if (!StoreModel.Instance.storeTypeDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | scroller.Refresh(); |
| | | int jumpIndex = -1; |
| | | var list = StoreModel.Instance.storeTypeDict[(int)StoreModel.Instance.selectStoreFuncType]; |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | if (i % 3 == 0) |
| | | { |
| | | scroller.AddCell(ScrollerDataType.Header, i); |
| | | } |
| | | if (jumpIndex == -1 && list[i].shopId == StoreModel.Instance.jumpShopID) |
| | | { |
| | | jumpIndex = i / 3; |
| | | } |
| | | } |
| | | scroller.Restart(); |
| | | scroller.lockType = EnhanceLockType.KeepVertical; |
| | | if (StoreModel.Instance.jumpShopID != 0) |
| | | { |
| | | scroller.JumpIndex(jumpIndex); |
| | | StoreModel.Instance.jumpShopID = 0; |
| | | } |
| | | } |
| | | |
| | | |
| | | void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | var _cell = cell as StoreLineCell; |
| | | _cell.Display(cell.index); |
| | | } |
| | | |
| | | |
| | | void ShowMoney() |
| | | { |
| | | if (!StoreModel.Instance.shopMoneyTypeDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType)) |
| | | { |
| | | return; |
| | | } |
| | | var moneyType = StoreModel.Instance.shopMoneyTypeDict[(int)StoreModel.Instance.selectStoreFuncType]; |
| | | ownMoneyCellWithShop.moneyType = moneyType; |
| | | ownMoneyCellWithShop.Display(true); |
| | | |
| | | if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Hero) |
| | | { |
| | | refreshGo.SetActive(true); |
| | | refreshMoneyIcon.SetIconWithMoneyType(StoreModel.Instance.heroSoulRefreshMoneyType); |
| | | |
| | | if (StoreModel.Instance.shopRefreshCntDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType)) |
| | | { |
| | | if (StoreModel.Instance.shopRefreshCntDict[(int)StoreModel.Instance.selectStoreFuncType] >= |
| | | StoreModel.Instance.heroSoulRefreshFreeCount) |
| | | { |
| | | refreshMoneyText.text = StoreModel.Instance.heroSoulRefreshMoney.ToString(); |
| | | } |
| | | else |
| | | { |
| | | refreshMoneyText.text = Language.Get("L1127"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | refreshMoneyText.text = Language.Get("L1127"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | refreshGo.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | void RefreshStore() |
| | | { |
| | | if (StoreModel.Instance.selectStoreFuncType != StoreFunc.Hero) |
| | | { |
| | | return; |
| | | } |
| | | var useCnt = 0; |
| | | if (StoreModel.Instance.shopRefreshCntDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType)) |
| | | { |
| | | if (StoreModel.Instance.shopRefreshCntDict[(int)StoreModel.Instance.selectStoreFuncType] >= |
| | | StoreModel.Instance.heroSoulRefreshFreeCount) |
| | | { |
| | | useCnt = StoreModel.Instance.heroSoulRefreshMoney; |
| | | } |
| | | } |
| | | |
| | | if (UIHelper.CheckMoneyCount(StoreModel.Instance.heroSoulRefreshMoneyType, useCnt, 2)) |
| | | { |
| | | StoreModel.Instance.RefreshStore((int)StoreFunc.Hero); |
| | | } |
| | | } |
| | | |
| | | void OnSelectStoreFuncType(int index) |
| | | { |
| | | if (index == 2) |
| | | { |
| | | if (!PlayerDatas.Instance.fairyData.HasFairy) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("NoGuild"); |
| | | return; |
| | | } |
| | | } |
| | | StoreModel.Instance.selectStoreFuncType = (StoreFunc)index; |
| | | Display(); |
| | | } |
| | | } |
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/System/Store/SkinStoreWin.cs.meta
| File was copied from Main/SDK/ynmbxxjUtil.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d69a5f50b06dc814ea13cb20acd59e3a |
| | | guid: 08c36714c5911864e87b2fa0f2d78eeb |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | currentSubUI = UIManager.Instance.OpenWindow<StoreWin>(); |
| | | break; |
| | | case 1: |
| | | //时装 |
| | | currentSubUI = UIManager.Instance.OpenWindow<SkinStoreWin>(); |
| | | break; |
| | | case 2: |
| | | // 充值界面 |
| | | currentSubUI = UIManager.Instance.OpenWindow<RechargeWin>(); |
| | | break; |
| | |
| | | catch (Exception e) |
| | | { |
| | | Debug.LogError($"{uiName}界面的InitComponentInternal报错: {e.StackTrace}"); |
| | | OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002"); |
| | | } |
| | | |
| | | try |
| | |
| | | catch (Exception e) |
| | | { |
| | | Debug.LogError($"{uiName}界面的InitComponent报错: {e.StackTrace}"); |
| | | OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002"); |
| | | } |
| | | |
| | | // 保存原始值用于动画 |
| | |
| | | catch (Exception e) |
| | | { |
| | | Debug.LogError($"{uiName}界面的OnPreOpen报错: {e.StackTrace}"); |
| | | OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002"); |
| | | } |
| | | |
| | | StopCurrentAnimation(); |
| | |
| | | catch (Exception e) |
| | | { |
| | | Debug.LogError($"{uiName}界面的OnOpen报错: {e.StackTrace}"); |
| | | OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002"); |
| | | } |
| | | |
| | | ApplyClickEmptySpaceClose(); |
| | |
| | | catch (Exception e) |
| | | { |
| | | Debug.LogError($"{uiName}界面的NextFrameAfterOpen报错: {e.StackTrace}"); |
| | | OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002"); |
| | | } |
| | | }); |
| | | } |
| | |
| | | catch (Exception e) |
| | | { |
| | | Debug.LogError($"{uiName}界面的OnPreClose报错: {e.StackTrace}"); |
| | | OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002"); |
| | | } |
| | | |
| | | StopCurrentAnimation(); |
| | |
| | | catch (Exception e) |
| | | { |
| | | Debug.LogError($"{uiName}界面的OnClose报错: {e.StackTrace}"); |
| | | OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002"); |
| | | } |
| | | |
| | | if (closeAnimationType == UIAnimationType.None) |
| | |
| | | catch (Exception e) |
| | | { |
| | | Debug.LogError($"{uiName}界面的CompleteClose报错: {e.StackTrace}"); |
| | | OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002"); |
| | | } |
| | | } |
| | | // 否则在动画完成后禁用游戏对象(在PlayCloseAnimation中处理) |
| | |
| | | public bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera) |
| | | { |
| | | return raycastTarget; |
| | | } |
| | | |
| | | public CanvasGroup GetCanvasGroup() |
| | | { |
| | | return canvasGroup; |
| | | } |
| | | |
| | | #region 动画方法 |
| | |
| | | catch (System.Exception e) |
| | | { |
| | | Debug.LogError($"播放打开动画时出错: {e.StackTrace}"); |
| | | OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002"); |
| | | |
| | | // 出错时确保UI可见并可交互 |
| | | if (canvasGroup != null) |
| | |
| | | catch (Exception e) |
| | | { |
| | | Debug.LogError($"{uiName}界面的CompleteClose报错: {e.StackTrace}"); |
| | | OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002"); |
| | | } |
| | | } |
| | | }); |
| | |
| | | catch (System.Exception e) |
| | | { |
| | | Debug.LogError($"播放关闭动画时出错: {e.StackTrace}"); |
| | | OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002"); |
| | | |
| | | // 出错时直接完成关闭 |
| | | isAnimating = false; |
| | |
| | | switch (Application.platform) |
| | | { |
| | | case RuntimePlatform.Android: |
| | | _memory = 0; //TODO YL collect device memory //ynmbxxjUtil.Instance.Device.totalMemory; |
| | | _memory = 0; |
| | | break; |
| | | case RuntimePlatform.IPhonePlayer: |
| | | _memory = IsLowMemory() ? 1 : 2 * 1024; |
| | |
| | |
|
| | |
|
| | | public class OperationLogCollect : Singleton<OperationLogCollect>
|
| | |
|
| | | {
|
| | | // const string url = "http://xssgcenter.secondworld.net.cn:11000/event_receiver?";
|
| | |
|
| | | // public void RecordLauchEvent(int _step)
|
| | | // {
|
| | | // return;
|
| | | // #if !UNITY_EDITOR
|
| | | // if (VersionConfig.Get().versionAuthority == VersionAuthority.Release)
|
| | | // {
|
| | | // var tables = new Dictionary<string, string>();
|
| | | // tables["OperatorID"] = VersionConfig.Get().appId;
|
| | | // tables["RegionName"] = "data";
|
| | | // tables["EventID"] = 9001.ToString();
|
| | | // tables["ProductID"] = VersionConfig.Get().gameId;
|
| | | // tables["Device"] = SystemInfo.deviceName;
|
| | | // tables["DeviceFlag"] = ynmbxxjUtil.Instance.Device.uniqueID;
|
| | | // tables["IP"] = DeviceUtility.GetIp();
|
| | | // tables["DeviceFlag"] = DeviceUtility.GetDeviceUniquenessIdentify();
|
| | | // tables["Flag"] = "1001";
|
| | | // tables["Time"] = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
| | | // tables["Step"] = _step.ToString();
|
| | |
|
| | | // HttpRequest.Instance.RequestHttpGet(StringUtility.Concat(url, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType);
|
| | | // }
|
| | | // #endif
|
| | | // }
|
| | |
|
| | | // public void RecordEvent(int _step, uint coin = 0)
|
| | | // {
|
| | | // return;
|
| | | // #if !UNITY_EDITOR
|
| | | // if (VersionConfig.Get().versionAuthority == VersionAuthority.Release)
|
| | | // {
|
| | | // var tables = new Dictionary<string, string>();
|
| | | // tables["OperatorID"] = VersionConfig.Get().appId;
|
| | | // tables["RegionName"] = "data";
|
| | | // tables["AccountID"] = ynmbxxjUtil.Instance.FreePlatformInfo == null ? "" : ynmbxxjUtil.Instance.FreePlatformInfo.account;
|
| | | // tables["EventID"] = 9001.ToString();
|
| | | // tables["ProductID"] = VersionConfig.Get().gameId;
|
| | | // tables["Device"] = SystemInfo.deviceName;
|
| | | // tables["IP"] = DeviceUtility.GetIp();
|
| | | // tables["DeviceFlag"] = ynmbxxjUtil.Instance.Device.uniqueID;
|
| | | // tables["Flag"] = VersionConfig.Get().clientPackageFlag;
|
| | | // tables["Time"] = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
| | | // tables["Step"] = _step.ToString();
|
| | |
|
| | | // if (coin != 0)
|
| | | // {
|
| | | // tables["Level"] = coin.ToString();
|
| | | // }
|
| | |
|
| | | // string _content = StringUtility.Concat(url, HttpRequest.HashtablaToString(tables));
|
| | | // HttpRequest.Instance.RequestHttpGet(_content, HttpRequest.defaultHttpContentType);
|
| | | // }
|
| | | // #endif
|
| | | // }
|
| | |
|
| | | // bool recordedDeviceDetail = false;
|
| | | // public void RecordDeviceDetails()
|
| | | // {
|
| | | // return;
|
| | | // #if !UNITY_EDITOR
|
| | | // if (VersionConfig.Get().versionAuthority != VersionAuthority.Release)
|
| | | // {
|
| | | // return;
|
| | | // }
|
| | |
|
| | | // if (!recordedDeviceDetail)
|
| | | // {
|
| | | // var tables = new Dictionary<string, string>();
|
| | | // tables["OperatorID"] = VersionConfig.Get().appId;
|
| | | // tables["RegionName"] = StringUtility.Concat("s" + ServerListCenter.Instance.currentServer.region_flag);
|
| | | // tables["EventID"] = 1102.ToString();
|
| | | // tables["ProductID"] = VersionConfig.Get().gameId;
|
| | | // tables["Time"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
| | | // tables["IP"] = DeviceUtility.GetIp();
|
| | | // tables["AccountID"] = ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account;
|
| | | // tables["SessionID"] = "";
|
| | |
|
| | | // var device = new Dictionary<string, string>();
|
| | | // device["IMEI"] = DeviceUtility.GetDeviceUniquenessIdentify();
|
| | | // device["DeviceFlag"] = ynmbxxjUtil.Instance.Device.uniqueID;
|
| | | // #if UNITY_ANDROID
|
| | | // device["IMEI2"] = ynmbxxjUtil.Instance.Device.uniqueID;
|
| | | // #endif
|
| | | // device["Brand"] = DeviceUtility.GetDeviceName();
|
| | | // device["MI5"] = DeviceUtility.GetDeviceModel();
|
| | | // tables["Device"] = JsonMapper.ToJson(device);
|
| | |
|
| | | // var runtime = new Dictionary<string, string>();
|
| | | // runtime["os_version"] = DeviceUtility.GetDeviceOSLevel();
|
| | | // tables["Runtime"] = JsonMapper.ToJson(runtime);
|
| | | // tables["Version"] = StringUtility.Concat(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex);
|
| | |
|
| | | // HttpRequest.Instance.RequestHttpGet(StringUtility.Concat(url, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType);
|
| | | // }
|
| | |
|
| | | // recordedDeviceDetail = true;
|
| | | // #endif
|
| | | // }
|
| | |
|
| | |
|
| | | const string bugReportUrl = "http://xssgcenter.secondworld.net.cn:11000/center/eventreport.php?";
|
| | |
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public void BugReportSys( string _content)
|
| | | //10000 战场报错, 10001 封包错误, 10002 界面操作
|
| | | public void BugReportSys(string _content, string sid = "10000")
|
| | | {
|
| | | #if !UNITY_EDITOR
|
| | | try
|
| | |
| | | var tables = new Dictionary<string, string>();
|
| | | tables["OperatorID"] = VersionConfig.Get().appId;
|
| | | tables["RegionName"] = "data";
|
| | | tables["RegionID"] = "10000";
|
| | | tables["RegionID"] = sid;
|
| | | tables["EventID"] = 9002.ToString();
|
| | | tables["ProductID"] = VersionConfig.Get().gameId;
|
| | | tables["Time"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|