Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
1 文件已重命名
26个文件已修改
1个文件已删除
5 文件已复制
14个文件已添加
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | public partial class HorseConfig : IConfigPostProcess |
| | | { |
| | | static Dictionary<int, int> itemUnlockHorseMap = new Dictionary<int, int>(); |
| | | |
| | | public void OnConfigParseCompleted() |
| | | { |
| | | itemUnlockHorseMap[UnlockItemID] = HorseID; |
| | | } |
| | | |
| | | public static int GetItemUnLockHorse(int itemId) |
| | | { |
| | | if (itemUnlockHorseMap.ContainsKey(itemId)) |
| | | { |
| | | return itemUnlockHorseMap[itemId]; |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } |
copy from System/KnapSack/Logic/PetMatInfoWin.cs.meta
copy to Core/GameEngine/Model/TelPartialConfig/PartialHorseConfig.cs.meta
| File was copied from System/KnapSack/Logic/PetMatInfoWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1ecb0731383014d44863af268e0d376c |
| | | timeCreated: 1525846932 |
| | | guid: 4daa64ed63cb868418aef659f368c280 |
| | | timeCreated: 1555404468 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | |
|
| | | public partial class PetInfoConfig : IConfigPostProcess
|
| | | {
|
| | | public static Dictionary<int, List<PetSkillLimit>> petSkillDict = new Dictionary<int, List<PetSkillLimit>>();
|
| | | static Dictionary<int, List<PetSkillLimit>> petSkillDict = new Dictionary<int, List<PetSkillLimit>>();
|
| | | static Dictionary<int, int> itemUnlockPetMap = new Dictionary<int, int>();
|
| | |
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | |
| | | lv = skillUnlocks[i],
|
| | | });
|
| | | }
|
| | |
|
| | | itemUnlockPetMap[UnLockNeedItemID] = ID;
|
| | | }
|
| | |
|
| | | public static void GetPetSkills(int petId, int lv, bool onlyAcitve, ref List<int> skills)
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public static int GetItemUnLockPet(int itemId)
|
| | | {
|
| | | if (itemUnlockPetMap.ContainsKey(itemId))
|
| | | {
|
| | | return itemUnlockPetMap[itemId];
|
| | | }
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public struct PetSkillLimit
|
| | | {
|
| | | public int skill;
|
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | //A2 02通知选中对象 # tagCMSelectObj |
| | | |
| | | public class CA202_tagCMSelectObj : GameNetPackBasic |
| | | { |
| | | public byte isSelect; //0 不选中 |
| | | public byte Type; //目标类型 |
| | | public uint ID; //ID |
| | | |
| | | public CA202_tagCMSelectObj() |
| | | { |
| | | combineCmd = (ushort)0x03FE; |
| | | _cmd = (ushort)0xA202; |
| | | } |
| | | |
| | | public override void WriteToBytes() |
| | | { |
| | | WriteBytes(isSelect, NetDataType.BYTE); |
| | | WriteBytes(Type, NetDataType.BYTE); |
| | | WriteBytes(ID, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
| File was renamed from System/KnapSack/Logic/PetMatInfoWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1ecb0731383014d44863af268e0d376c |
| | | timeCreated: 1525846932 |
| | | guid: fbbd0a74db4e14a428e1a0fc7c69386b |
| | | timeCreated: 1555406256 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3e05761d690b75440a6be79207d0fb01 |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1d70ccd06161e0443b7a802ad94292f8 |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 71e878ac60c49ad4f964dd2dbc725739 |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: eed34091b0568664b9fb42f0634496c1 |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 32ceb8b7faf99f84a8b73ce53c5e3e4d |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77f69c2b862d1704299a32d0d8eeb71e |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: fa14960fa44b0d1439bab471a764e34f |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d914565b65f8e8145988734c4d915834 |
| | | folderAsset: yes |
| | | timeCreated: 1547643019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | }
|
| | | }
|
| | | }
|
| | | if (PreFightMission.Instance.IsFinished() == false)
|
| | |
|
| | | if (PlayerDatas.Instance.baseData.AttackMode == (byte)E_AttackMode.Contest)
|
| | | {
|
| | | _hitTestLimit = 10;
|
| | | _hitTestLimit = 1;
|
| | | }
|
| | |
|
| | | E_SkillCastType _castType = (E_SkillCastType)(skill.skillInfo.config.Tag % 10);
|
| | | E_SkillCastTarget _targetType = (E_SkillCastTarget)(skill.skillInfo.config.Tag / 10);
|
| | |
|
| | |
| | | /// 用户点击锁定, 被攻击锁定攻击者...
|
| | | /// </summary>
|
| | | private GActor m_LockTarget;
|
| | | public GActor LockTarget {
|
| | | public GActor LockTarget
|
| | | {
|
| | | get { return m_LockTarget; }
|
| | | set {
|
| | | set
|
| | | {
|
| | | if (m_LockTarget == value)
|
| | | {
|
| | | return;
|
| | |
| | | public MapArea currentBossArea;
|
| | |
|
| | | private uint _atkBossID;
|
| | | public uint atkBossID {
|
| | | get {
|
| | | public uint atkBossID
|
| | | {
|
| | | get
|
| | | {
|
| | | return _atkBossID;
|
| | | }
|
| | | set {
|
| | | set
|
| | | {
|
| | | if (_atkBossID != value)
|
| | | {
|
| | | _atkBossID = value;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public sealed override int NextAction {
|
| | | get {
|
| | | public sealed override int NextAction
|
| | | {
|
| | | get
|
| | | {
|
| | | return base.NextAction;
|
| | | }
|
| | |
|
| | | set {
|
| | | set
|
| | | {
|
| | | base.NextAction = value;
|
| | | }
|
| | | }
|
| | |
|
| | | public sealed override GActor SelectTarget {
|
| | | get {
|
| | | public sealed override GActor SelectTarget
|
| | | {
|
| | | get
|
| | | {
|
| | | return base.SelectTarget;
|
| | | }
|
| | |
|
| | | set {
|
| | | set
|
| | | {
|
| | | if (base.SelectTarget == value)
|
| | | {
|
| | | return;
|
| | |
| | | }
|
| | |
|
| | | base.SelectTarget = value;
|
| | |
|
| | | if (PlayerDatas.Instance.baseData.AttackMode == (byte)E_AttackMode.Contest)
|
| | | {
|
| | | var _pkg = new CA202_tagCMSelectObj();
|
| | | if (value == null)
|
| | | {
|
| | | _pkg.isSelect = 0;
|
| | | }
|
| | | else
|
| | | {
|
| | | _pkg.isSelect = 1;
|
| | | _pkg.ID = value.ServerInstID;
|
| | | _pkg.Type = (byte)value.ActorType;
|
| | | }
|
| | |
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | GameNetSystem.Instance.SendToCrossServer(_pkg);
|
| | | }
|
| | | else
|
| | | {
|
| | | GameNetSystem.Instance.SendInfo(_pkg);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | private HeavenBattleModel m_HeavenBattleModel = null;
|
| | | public HeavenBattleModel heavenBattleModel {
|
| | | get {
|
| | | public HeavenBattleModel heavenBattleModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_HeavenBattleModel ?? (m_HeavenBattleModel = ModelCenter.Instance.GetModel<HeavenBattleModel>());
|
| | | }
|
| | | }
|
| | |
| | | #region 地图区域相关处理
|
| | |
|
| | | private int m_CurMapArea = 1 << (int)MapArea.E_Type.Normal;
|
| | | public int CurMapArea {
|
| | | get {
|
| | | public int CurMapArea
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_CurMapArea;
|
| | | }
|
| | | set {
|
| | | set
|
| | | {
|
| | | m_CurMapArea = value;
|
| | | }
|
| | | }
|
| | |
| | | |
| | | if (_chkDistSqrt < 4) |
| | | { |
| | | var _model = ModelCenter.Instance.GetModel<HazyGrassModel>(); |
| | | if (_model.CanCollectClientNpc(NpcConfig.NPCID)) |
| | | { |
| | | StartCollect(); |
| | | } |
| | | else |
| | | { |
| | | _model.DisplayCollectErrorTip(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private bool m_StartCollect; |
| | |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetPetSkillCondition", _m_GetPetSkillCondition_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "TryGetPetIdBySkill", _m_TryGetPetIdBySkill_xlua_st_); |
| | | |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "inited", _g_get_inited); |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "petSkillDict", _g_get_petSkillDict); |
| | | |
| | | Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "petSkillDict", _s_set_petSkillDict); |
| | | |
| | | |
| | | Utils.EndClassRegister(type, L, translator); |
| | | } |
| | |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_petSkillDict(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | translator.Push(L, PetInfoConfig.petSkillDict); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_petSkillDict(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | PetInfoConfig.petSkillDict = (System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<PetInfoConfig.PetSkillLimit>>)translator.GetObject(L, 1, typeof(System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<PetInfoConfig.PetSkillLimit>>)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | Dictionary<int, int> petSkillDict;
|
| | | Dictionary<int, List<int>> mountSkillDict;
|
| | | private List<GameObject> tempObjlist = new List<GameObject>();
|
| | | PetMatType matType = PetMatType.None;
|
| | | PetOrMount matType = PetOrMount.None;
|
| | | PetModel petmodel { get { return ModelCenter.Instance.GetModel<PetModel>(); } }
|
| | | MountModel mountModel { get { return ModelCenter.Instance.GetModel<MountModel>(); } }
|
| | |
|
| | |
| | |
|
| | | private void InitUI()
|
| | | {
|
| | | matType = PetMatType.None;
|
| | | matType = PetOrMount.None;
|
| | | petSkillDict = null;
|
| | | mountSkillDict = null;
|
| | | if (itemPathModel.chinItemModel == null) return;
|
| | |
|
| | | if (tipsModel.unlockPetDict.ContainsKey(itemPathModel.chinItemModel.ID))
|
| | | {
|
| | | matType = PetMatType.Pet;
|
| | | matType = PetOrMount.Pet;
|
| | | }
|
| | | else if (tipsModel.unlockMountDict.ContainsKey(itemPathModel.chinItemModel.ID))
|
| | | {
|
| | | matType = PetMatType.Mount;
|
| | | matType = PetOrMount.Mount;
|
| | | }
|
| | |
|
| | | tipAlpha.alpha = 0;
|
| | |
| | | Dictionary<int, int> itemEffectDict = null;
|
| | | switch (matType)
|
| | | {
|
| | | case PetMatType.Pet:
|
| | | case PetOrMount.Pet:
|
| | | PetInfoConfig petInfo = tipsModel.unlockPetDict[itemPathModel.chinItemModel.ID];
|
| | | itemEffectDict = petmodel.GetPetAttrAddDict(petInfo.ID);
|
| | | break;
|
| | | case PetMatType.Mount:
|
| | | case PetOrMount.Mount:
|
| | | HorseConfig horseConfig = tipsModel.unlockMountDict[itemPathModel.chinItemModel.ID];
|
| | | itemEffectDict = mountModel.GetMountAttrAddDict(horseConfig.HorseID);
|
| | | break;
|
| | |
| | | {
|
| | | switch (matType)
|
| | | {
|
| | | case PetMatType.Pet:
|
| | | case PetOrMount.Pet:
|
| | | PetInfoConfig petInfo = tipsModel.unlockPetDict[itemPathModel.chinItemModel.ID];
|
| | | petSkillDict = tipsModel.GetPetSkillDict(itemPathModel.chinItemModel.ID);
|
| | | modelShow.SetModelShow(petInfo.ID, ModelShowType.pet, Language.Get("TreasureEffect103"), petInfo.ShowFightPower);
|
| | | modelShow.SetModelShow(petInfo.ID, ModelShowType.Pet, Language.Get("TreasureEffect103"), petInfo.ShowFightPower);
|
| | | break;
|
| | | case PetMatType.Mount:
|
| | | case PetOrMount.Mount:
|
| | | HorseConfig horseConfig = tipsModel.unlockMountDict[itemPathModel.chinItemModel.ID];
|
| | | mountSkillDict = tipsModel.GetMountSkillDict(itemPathModel.chinItemModel.ID);
|
| | | modelShow.SetModelShow(horseConfig.Model, ModelShowType.mount, Language.Get("TreasureEffect103"), horseConfig.ShowFightPower);
|
| | | modelShow.SetModelShow(horseConfig.Model, ModelShowType.Mount, Language.Get("TreasureEffect103"), horseConfig.ShowFightPower);
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | protected override void OnPreClose()
|
| | | {
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | UI3DTreasureExhibition.Instance.Stop();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | {
|
| | | case ActivateShow.ActivateFunc.Stove:
|
| | | m_ModelRawImage.rectTransform.sizeDelta = new Vector2(600, 600);
|
| | | UI3DTreasureExhibition.Instance.BeginShowTreasure(301, m_ModelRawImage);
|
| | | UI3DTreasureExhibition.Instance.ShowTreasure(301, m_ModelRawImage);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private void WindowBeforeCloseEvent(Window window)
|
| | | {
|
| | | if (window is PetMatInfoWin)
|
| | | if (window is PetMountTipWin)
|
| | | {
|
| | | DisplayBossModel();
|
| | | }
|
| | |
| | | |
| | | public BaseInfo baseInfo; |
| | | public BaseProperty baseProperty; |
| | | public BaseProperty petMountBaseProperty; |
| | | public LegendProperty legendProperty; |
| | | public SkillInfo skillInfo; |
| | | public SuitInfo suitInfo; |
| | |
| | | static EquipGemModel gemModel { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } } |
| | | static EquipTrainModel trainModel { get { return ModelCenter.Instance.GetModel<EquipTrainModel>(); } } |
| | | static EquipStrengthModel strengthenModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } } |
| | | static MountModel mountModel { get { return ModelCenter.Instance.GetModel<MountModel>(); } } |
| | | static PetModel perModel { get { return ModelCenter.Instance.GetModel<PetModel>(); } } |
| | | |
| | | public static TipType tipType { get; private set; } |
| | | public static TipData mainTipData { get; private set; } |
| | |
| | | mainTipData = CreateItemData(itemId); |
| | | } |
| | | |
| | | var config = ItemConfig.Get(itemId); |
| | | switch (type) |
| | | { |
| | | case TipType.Normal: |
| | |
| | | } |
| | | else |
| | | { |
| | | switch (config.Type) |
| | | { |
| | | case 26: |
| | | case 41: |
| | | case 42: |
| | | WindowCenter.Instance.Open<PetMountTipWin>(); |
| | | break; |
| | | default: |
| | | WindowCenter.Instance.Open<ItemTipWin>(); |
| | | break; |
| | | } |
| | | } |
| | | break; |
| | | case TipType.Good: |
| | |
| | | } |
| | | else |
| | | { |
| | | switch (item.config.Type) |
| | | { |
| | | case 26: |
| | | case 41: |
| | | case 42: |
| | | WindowCenter.Instance.Open<PetMountTipWin>(); |
| | | break; |
| | | default: |
| | | WindowCenter.Instance.Open<ItemTipWin>(); |
| | | break; |
| | | } |
| | | } |
| | | break; |
| | | case TipType.Good: |
| | |
| | | guid = guid, |
| | | |
| | | baseInfo = GetBaseInfo(guid), |
| | | petMountBaseProperty=GetPetMountBaseProperty(item.itemId), |
| | | operates = GetOperates(guid), |
| | | }; |
| | | } |
| | |
| | | { |
| | | itemId = itemId, |
| | | baseInfo = GetBaseInfo(itemId), |
| | | petMountBaseProperty = GetPetMountBaseProperty(itemId), |
| | | }; |
| | | } |
| | | |
| | |
| | | return baseProperty; |
| | | } |
| | | |
| | | private static BaseProperty GetPetMountBaseProperty(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | var baseProperty = new BaseProperty(); |
| | | Dictionary<int, int> properties = null; |
| | | switch (config.Type) |
| | | { |
| | | case 26: |
| | | var petId = PetInfoConfig.GetItemUnLockPet(itemId); |
| | | properties = perModel.GetPetAttrAddDict(petId); |
| | | break; |
| | | case 41: |
| | | case 42: |
| | | var horseId = HorseConfig.GetItemUnLockHorse(itemId); |
| | | properties = mountModel.GetMountAttrAddDict(horseId); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | if (properties != null) |
| | | { |
| | | baseProperty.baseProperties = new List<Int2>(); |
| | | foreach (var property in properties) |
| | | { |
| | | baseProperty.baseProperties.Add(new Int2(property.Key, property.Value)); |
| | | } |
| | | } |
| | | |
| | | return baseProperty; |
| | | } |
| | | |
| | | private static LegendProperty GetLegendProperty(int itemId) |
| | | { |
| | | var data = new LegendProperty(); |
| | |
| | | [SerializeField] TipItemBaseInfoWidget m_BaseInfoWidget; |
| | | [SerializeField] TipItemDescriptionWidget m_DescriptionWidget; |
| | | [SerializeField] TipAuctionTipWidget m_AuctionWidget; |
| | | [SerializeField] TipModelWidget m_ModelWidget; |
| | | [SerializeField] OperateButton[] m_OperateButtons; |
| | | |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | |
| | | DisplayItemUseState(); |
| | | DisplayAuctionInfo(); |
| | | DisplayOperateButton(); |
| | | DisplayModel(); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | } |
| | | } |
| | | |
| | | private void DisplayModel() |
| | | { |
| | | var baseInfo = EquipTipUtility.mainTipData.baseInfo; |
| | | var config = ItemConfig.Get(baseInfo.itemId); |
| | | |
| | | m_ModelWidget.gameObject.SetActive(config.Type == 124 || config.Type == 125); |
| | | switch (config.Type) |
| | | { |
| | | case 124: |
| | | var horseId = HorseConfig.GetItemUnLockHorse(config.EffectValueA1); |
| | | var horseConfig = HorseConfig.Get(horseId); |
| | | m_ModelWidget.Display(horseConfig.Model, ModelShowType.Mount, horseConfig.ShowFightPower); |
| | | break; |
| | | case 125: |
| | | var petId = PetInfoConfig.GetItemUnLockPet(config.EffectValueA1); |
| | | var petConfig = PetInfoConfig.Get(petId); |
| | | m_ModelWidget.Display(petId, ModelShowType.Pet, petConfig.ShowFightPower); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | |
| | | private void DisplayOperateButton() |
| | | { |
| | | var operates = EquipTipUtility.mainTipData.operates; |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, April 16, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class PetMountTipWin : Window |
| | | { |
| | | [SerializeField] RectTransform m_Pivot; |
| | | [SerializeField] ImageEx m_Label; |
| | | [SerializeField] Text m_ItemName; |
| | | [SerializeField] TipBasePropertyWidget m_BaseProperty; |
| | | [SerializeField] TipPetMountSkillWidget m_PetMountSkill; |
| | | [SerializeField] TipAuctionTipWidget m_AuctionWidget; |
| | | [SerializeField] TipPetMountDescriptionWidget m_DescriptionWidget; |
| | | [SerializeField] TipModelWidget m_Model; |
| | | [SerializeField] OperateButton[] m_OperateButtons; |
| | | |
| | | [SerializeField] Button m_Close; |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Close.SetListener(() => { WindowCenter.Instance.Close<PetMountTipWin>(); }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | m_Pivot.localScale = Vector3.zero; |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | |
| | | StartCoroutine("Co_DelayDisplay"); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | private void DisplayBaseInfo() |
| | | { |
| | | var baseInfo = EquipTipUtility.mainTipData.baseInfo; |
| | | |
| | | var config = ItemConfig.Get(baseInfo.itemId); |
| | | m_ItemName.text = config.ItemName; |
| | | m_ItemName.color = UIHelper.GetUIColor(config.ItemColor); |
| | | |
| | | if (baseInfo.isAuction) |
| | | { |
| | | m_Label.gameObject.SetActive(true); |
| | | m_Label.SetSprite("Item_Auction_2"); |
| | | m_Label.gray = baseInfo.auctionSurplusTime <= 0; |
| | | } |
| | | else |
| | | { |
| | | m_Label.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | private void DisplayBaseProperty() |
| | | { |
| | | m_BaseProperty.Display(EquipTipUtility.mainTipData.petMountBaseProperty); |
| | | } |
| | | |
| | | private void DisplaySkills() |
| | | { |
| | | var baseInfo = EquipTipUtility.mainTipData.baseInfo; |
| | | var config = ItemConfig.Get(baseInfo.itemId); |
| | | switch (config.Type) |
| | | { |
| | | case 26: |
| | | m_PetMountSkill.Display(ShowType.Pet, baseInfo.itemId); |
| | | break; |
| | | case 41: |
| | | case 42: |
| | | m_PetMountSkill.Display(ShowType.Mount, baseInfo.itemId); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void DisplayAuctionInfo() |
| | | { |
| | | var baseInfo = EquipTipUtility.mainTipData.baseInfo; |
| | | m_AuctionWidget.gameObject.SetActive(baseInfo.isAuction); |
| | | if (baseInfo.isAuction) |
| | | { |
| | | var overdueTime = DateTime.Now.AddSeconds((double)baseInfo.auctionSurplusTime); |
| | | m_AuctionWidget.Display(overdueTime); |
| | | } |
| | | } |
| | | |
| | | private void DisplayDescription() |
| | | { |
| | | var baseInfo = EquipTipUtility.mainTipData.baseInfo; |
| | | m_DescriptionWidget.gameObject.SetActive(!baseInfo.isAuction); |
| | | if (!baseInfo.isAuction) |
| | | { |
| | | m_DescriptionWidget.Display(baseInfo.itemId); |
| | | } |
| | | } |
| | | |
| | | private void DisplayModel() |
| | | { |
| | | var baseInfo = EquipTipUtility.mainTipData.baseInfo; |
| | | var config = ItemConfig.Get(baseInfo.itemId); |
| | | switch (config.Type) |
| | | { |
| | | case 26: |
| | | var petId = PetInfoConfig.GetItemUnLockPet(baseInfo.itemId); |
| | | var petConfig = PetInfoConfig.Get(petId); |
| | | m_Model.Display(petId, ModelShowType.Pet, petConfig.ShowFightPower); |
| | | break; |
| | | case 41: |
| | | case 42: |
| | | var horseId = HorseConfig.GetItemUnLockHorse(baseInfo.itemId); |
| | | var horseConfig = HorseConfig.Get(horseId); |
| | | m_Model.Display(horseConfig.Model, ModelShowType.Mount, horseConfig.ShowFightPower); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void DisplayOperateButton() |
| | | { |
| | | var operates = EquipTipUtility.mainTipData.operates; |
| | | var guid = EquipTipUtility.mainTipData.guid; |
| | | if (operates.IsNullOrEmpty()) |
| | | { |
| | | for (int i = 0; i < m_OperateButtons.Length; i++) |
| | | { |
| | | var button = m_OperateButtons[i]; |
| | | button.SetActive(false); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i < m_OperateButtons.Length; i++) |
| | | { |
| | | var button = m_OperateButtons[i]; |
| | | if (i < operates.Count) |
| | | { |
| | | button.SetActive(true); |
| | | button.Bind(operates[i], guid); |
| | | } |
| | | else |
| | | { |
| | | button.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | IEnumerator Co_DelayDisplay() |
| | | { |
| | | yield return null; |
| | | yield return null; |
| | | m_Pivot.localScale = Vector3.one; |
| | | DisplayBaseInfo(); |
| | | DisplayBaseProperty(); |
| | | DisplaySkills(); |
| | | DisplayAuctionInfo(); |
| | | DisplayDescription(); |
| | | DisplayModel(); |
| | | DisplayOperateButton(); |
| | | } |
| | | |
| | | [Serializable] |
| | | public class OperateButton |
| | | { |
| | | [SerializeField] RectTransform m_Container; |
| | | [SerializeField] Button m_Button; |
| | | [SerializeField] Text m_Title; |
| | | |
| | | ItemOperateType operateType; |
| | | string guid; |
| | | |
| | | public void SetActive(bool active) |
| | | { |
| | | this.m_Container.gameObject.SetActive(active); |
| | | } |
| | | |
| | | public void Bind(ItemOperateType type, string guid) |
| | | { |
| | | operateType = type; |
| | | this.guid = guid; |
| | | switch (type) |
| | | { |
| | | case ItemOperateType.putAway: |
| | | this.m_Title.text = "上架"; |
| | | break; |
| | | case ItemOperateType.sell: |
| | | this.m_Title.text = "出售"; |
| | | break; |
| | | case ItemOperateType.makeUse: |
| | | this.m_Title.text = "使用"; |
| | | break; |
| | | case ItemOperateType.putOut: |
| | | this.m_Title.text = "取出"; |
| | | break; |
| | | case ItemOperateType.putIn: |
| | | this.m_Title.text = "放入"; |
| | | break; |
| | | default: |
| | | this.m_Title.text = ""; |
| | | break; |
| | | } |
| | | |
| | | m_Button.SetListener(() => |
| | | { |
| | | WindowCenter.Instance.Close<ItemTipWin>(); |
| | | EquipTipUtility.Operate(operateType, this.guid); |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | public enum ShowType |
| | | { |
| | | None, |
| | | Pet, |
| | | Mount, |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
copy from System/KnapSack/Logic/PetMatInfoWin.cs.meta
copy to System/ItemTip/PetMountTipWin.cs.meta
| File was copied from System/KnapSack/Logic/PetMatInfoWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1ecb0731383014d44863af268e0d376c |
| | | timeCreated: 1525846932 |
| | | guid: 18ed4c771f5e25740ac43932bbe5a611 |
| | | timeCreated: 1555402553 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | public class TipModelWidget : MonoBehaviour |
| | | { |
| | | |
| | | [SerializeField] Text m_Title; |
| | | [SerializeField] RawImage m_Model; |
| | | [SerializeField] Text m_FightPower; |
| | | [SerializeField] Image m_Fight; |
| | |
| | | FashionDressModel fashionDressModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } } |
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } |
| | | |
| | | public void OnDisable() |
| | | void OnDisable() |
| | | { |
| | | switch (showType) |
| | | { |
| | | case ModelShowType.treasure: |
| | | UI3DTreasureExhibition.Instance.StopShow(); |
| | | case ModelShowType.Treasure: |
| | | UI3DTreasureExhibition.Instance.Stop(); |
| | | break; |
| | | case ModelShowType.mount: |
| | | case ModelShowType.Mount: |
| | | break; |
| | | case ModelShowType.pet: |
| | | case ModelShowType.Pet: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | public void Display(int id, ModelShowType showType, string title, int fightValue = 0) |
| | | public void Display(int id, ModelShowType showType, int fightValue = 0) |
| | | { |
| | | m_Title.text = title; |
| | | this.showType = showType; |
| | | |
| | | switch (showType) |
| | | { |
| | | case ModelShowType.treasure: |
| | | case ModelShowType.Treasure: |
| | | m_Fight.SetSprite("FightingLv_Normal"); |
| | | UI3DTreasureExhibition.Instance.BeginShowTreasure(id, m_Model); |
| | | UI3DTreasureExhibition.Instance.ShowTreasure(id, m_Model); |
| | | break; |
| | | case ModelShowType.mount: |
| | | case ModelShowType.Mount: |
| | | m_Fight.SetSprite("FightingLv_Max"); |
| | | UI3DModelExhibition.Instance.ShowHourse(id, m_Model); |
| | | break; |
| | | case ModelShowType.pet: |
| | | case ModelShowType.Pet: |
| | | m_Fight.SetSprite("FightingLv_Max"); |
| | | var npcConfig = NPCConfig.Get(id); |
| | | UI3DModelExhibition.Instance.ShowNPC(id, npcConfig.UIModeLOffset, npcConfig.UIModelRotation, m_Model); |
| | |
| | | var itemConfig = ItemConfig.Get(id); |
| | | if (itemConfig != null) |
| | | { |
| | | int fashionType = 0; |
| | | int fashionId = 0; |
| | | bool isFashion = tipsModel.TryGetItemFashionData(itemConfig.ID, out fashionType, out fashionId); |
| | | var fashionType = 0; |
| | | var fashionId = 0; |
| | | var isFashion = tipsModel.TryGetItemFashionData(itemConfig.ID, out fashionType, out fashionId); |
| | | if (isFashion) |
| | | { |
| | | List<int> fashionIds = null; |
| | |
| | | fashionSecondaryId = fashionSecondaryId, |
| | | isDialogue = false, |
| | | }; |
| | | |
| | | return data; |
| | | } |
| | | |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class TipPetMountDescriptionWidget : MonoBehaviour |
| | | { |
| | | [SerializeField] Text m_Description; |
| | | |
| | | public void Display(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | m_Description.text = config.Description; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
copy from System/KnapSack/Logic/PetMatInfoWin.cs.meta
copy to System/ItemTip/TipPetMountDescriptionWidget.cs.meta
| File was copied from System/KnapSack/Logic/PetMatInfoWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1ecb0731383014d44863af268e0d376c |
| | | timeCreated: 1525846932 |
| | | guid: 3dd3994efd9cfae4b88db3a72aec0d32 |
| | | timeCreated: 1555414193 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, April 16, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class TipPetMountSkillBehaviour : ScrollItem |
| | | { |
| | | [SerializeField] Image m_Icon; |
| | | [SerializeField] Text m_SkillName; |
| | | [SerializeField] Text m_UnLockLevel; |
| | | [SerializeField] Text m_Description; |
| | | |
| | | public override void Display(object _data) |
| | | { |
| | | base.Display(_data); |
| | | |
| | | var info = (TipPetMountSkillWidget.SkillInfo)_data; |
| | | var config = SkillConfig.Get(info.skillId); |
| | | if (config == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | m_Icon.SetSprite(config.IconName); |
| | | m_SkillName.text = config.SkillName; |
| | | m_UnLockLevel.text = Language.Get("L1120", info.unlockLevel); |
| | | m_Description.text = config.Description; |
| | | } |
| | | |
| | | public override void Dispose() |
| | | { |
| | | base.Dispose(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/KnapSack/Logic/PetMatInfoWin.cs.meta
copy to System/ItemTip/TipPetMountSkillBehaviour.cs.meta
| File was copied from System/KnapSack/Logic/PetMatInfoWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1ecb0731383014d44863af268e0d376c |
| | | timeCreated: 1525846932 |
| | | guid: fb1e8498035fdad4788e3f24e3b467f3 |
| | | timeCreated: 1555402975 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, April 16, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class TipPetMountSkillWidget : MonoBehaviour |
| | | { |
| | | [SerializeField] CyclicScroll m_Scroll; |
| | | |
| | | public void Display(PetMountTipWin.ShowType showType, int itemId) |
| | | { |
| | | var skillInfos = new List<SkillInfo>(); |
| | | |
| | | switch (showType) |
| | | { |
| | | case PetMountTipWin.ShowType.Pet: |
| | | var petId = PetInfoConfig.GetItemUnLockPet(itemId); |
| | | var petConfig = PetInfoConfig.Get(petId); |
| | | |
| | | var min = Mathf.Min(petConfig.SkillID.Length, petConfig.SkillUnLock.Length); |
| | | for (var i = 0; i < min; i++) |
| | | { |
| | | var skillId = petConfig.SkillID[i]; |
| | | var unlockLevel = petConfig.SkillUnLock[i]; |
| | | skillInfos.Add(new SkillInfo() { skillId = skillId, unlockLevel = unlockLevel }); |
| | | } |
| | | break; |
| | | case PetMountTipWin.ShowType.Mount: |
| | | var horseId = HorseConfig.GetItemUnLockHorse(itemId); |
| | | var horseUpConfigs = HorseUpConfig.GetMountlistById(horseId); |
| | | foreach (var config in horseUpConfigs) |
| | | { |
| | | foreach (var skill in config.SkillID) |
| | | { |
| | | if (skill > 0) |
| | | { |
| | | skillInfos.Add(new SkillInfo() { skillId = skill, unlockLevel = config.LV }); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | |
| | | m_Scroll.Init(skillInfos); |
| | | } |
| | | |
| | | public struct SkillInfo |
| | | { |
| | | public int skillId; |
| | | public int unlockLevel; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/KnapSack/Logic/PetMatInfoWin.cs.meta
copy to System/ItemTip/TipPetMountSkillWidget.cs.meta
| File was copied from System/KnapSack/Logic/PetMatInfoWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1ecb0731383014d44863af268e0d376c |
| | | timeCreated: 1525846932 |
| | | guid: e73ec57ed26b0b6478fc3822569c81b6 |
| | | timeCreated: 1555402806 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | } |
| | | |
| | | var config = ItemConfig.Get(itemId); |
| | | return config.Type >= 119 && config.Type <= 124; |
| | | return config.Type >= 119 && config.Type <= 123; |
| | | } |
| | | |
| | | } |
| | |
| | |
|
| | | public Dictionary<int, PetInfoConfig> unlockPetDict { get; private set; }
|
| | | public Dictionary<int, HorseConfig> unlockMountDict { get; private set; }
|
| | |
|
| | | private Dictionary<int, Dictionary<int, int>> petSkillDict = new Dictionary<int, Dictionary<int, int>>(); // 编号 解锁阶级 技能
|
| | | private Dictionary<int, Dictionary<int, List<int>>> mountSkillDict = new Dictionary<int, Dictionary<int, List<int>>>(); // 编号 解锁阶级 技能
|
| | |
|
| | | Dictionary<int, string> petAndMountQualityDict = new Dictionary<int, string>();
|
| | | string expValueFormula = "";
|
| | | Dictionary<int, string> exhaustedAttrFormula { get; set; }
|
| | |
| | | WindowCenter.Instance.Open<BuyBoxInfoWin>();
|
| | | break;
|
| | | case ItemWinType.petMatWin:
|
| | | WindowCenter.Instance.Open<PetMatInfoWin>();
|
| | | if (curAttrData.isPreview)
|
| | | {
|
| | | EquipTipUtility.Show(TipType.Normal, curAttrData.itemId);
|
| | | }
|
| | | else
|
| | | {
|
| | | EquipTipUtility.Show(curAttrData.guid);
|
| | | }
|
| | | break;
|
| | | case ItemWinType.buyPetMatWin:
|
| | | WindowCenter.Instance.Open<BuyPetMatInfoWin>();
|
| | |
| | | case 125:
|
| | | PetInfoConfig petInfo = unlockPetDict[config.EffectValueA1];
|
| | | fightPower = petInfo.ShowFightPower;
|
| | | showPerfab.SetModelShow(petInfo.ID, ModelShowType.pet, Language.Get("TreasureEffect103"), fightPower);
|
| | | showPerfab.SetModelShow(petInfo.ID, ModelShowType.Pet, Language.Get("TreasureEffect103"), fightPower);
|
| | | return true;
|
| | | case 124:
|
| | | HorseConfig horseConfig = unlockMountDict[config.EffectValueA1];
|
| | | fightPower = horseConfig.ShowFightPower;
|
| | | showPerfab.SetModelShow(horseConfig.Model, ModelShowType.mount, Language.Get("TreasureEffect103"), fightPower);
|
| | | showPerfab.SetModelShow(horseConfig.Model, ModelShowType.Mount, Language.Get("TreasureEffect103"), fightPower);
|
| | | return true;
|
| | | }
|
| | | bool isFashion = TryGetFashionFightPower(config, out fightPower);
|
| | |
| | | {
|
| | | switch (showType)
|
| | | {
|
| | | case ModelShowType.treasure:
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | case ModelShowType.Treasure:
|
| | | UI3DTreasureExhibition.Instance.Stop();
|
| | | break;
|
| | | case ModelShowType.mount:
|
| | | case ModelShowType.Mount:
|
| | | break;
|
| | | case ModelShowType.pet:
|
| | | case ModelShowType.Pet:
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | switch (showType)
|
| | | {
|
| | | case ModelShowType.treasure:
|
| | | case ModelShowType.Treasure:
|
| | | fightImg.SetSprite("FightingLv_Normal");
|
| | | UI3DTreasureExhibition.Instance.BeginShowTreasure(id, modelImg);
|
| | | UI3DTreasureExhibition.Instance.ShowTreasure(id, modelImg);
|
| | | break;
|
| | | case ModelShowType.mount:
|
| | | case ModelShowType.Mount:
|
| | | fightImg.SetSprite("FightingLv_Max");
|
| | | UI3DModelExhibition.Instance.ShowHourse(id, modelImg);
|
| | | break;
|
| | | case ModelShowType.pet:
|
| | | case ModelShowType.Pet:
|
| | | fightImg.SetSprite("FightingLv_Max");
|
| | | var npcConfig = NPCConfig.Get(id);
|
| | | UI3DModelExhibition.Instance.ShowNPC(id, npcConfig.UIModeLOffset, npcConfig.UIModelRotation, modelImg);
|
| | |
| | |
|
| | | public enum ModelShowType
|
| | | {
|
| | | treasure, //法宝
|
| | | mount, //坐骑
|
| | | pet, //灵宠
|
| | | Treasure, //法宝
|
| | | Mount, //坐骑
|
| | | Pet, //灵宠
|
| | | FashionDress, //时装
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | sourceText.text = Language.Get("TreasureEffect101", treasureEffect.vipLv);
|
| | | }
|
| | | modelShow.SetModelShow(treasureEffect.treasureId,ModelShowType.treasure,Language.Get("TreasureEffect103"));
|
| | | modelShow.SetModelShow(treasureEffect.treasureId,ModelShowType.Treasure,Language.Get("TreasureEffect103"));
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | fightBg.SetActive(false);
|
| | | fightNumText.gameObject.SetActive(false);
|
| | | }
|
| | | modelShow.SetModelShow(kingShowModel.treasureId, ModelShowType.treasure, Language.Get("TreasureEffect103"));
|
| | | modelShow.SetModelShow(kingShowModel.treasureId, ModelShowType.Treasure, Language.Get("TreasureEffect103"));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | packModel.refreshItemCountEvent += OnPackUpdate;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += OnPlayerDataUpdate;
|
| | | WindowCenter.Instance.windowBeforeCloseEvent += BeforeWindowClose;
|
| | | WindowCenter.Instance.windowAfterCloseEvent += AfterWindowClose;
|
| | | GlobalTimeEvent.Instance.secondEvent += UpdateSecond;
|
| | |
|
| | | UpdateMoney();
|
| | |
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent -= UpdateSecond;
|
| | | packModel.refreshItemCountEvent -= OnPackUpdate;
|
| | | WindowCenter.Instance.windowBeforeCloseEvent -= BeforeWindowClose;
|
| | | WindowCenter.Instance.windowAfterCloseEvent -= AfterWindowClose;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerDataUpdate;
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | }
|
| | |
| | | UI3DModelExhibition.Instance.ShowPlayer(m_Role, PlayerDatas.Instance.baseData.Job);
|
| | | }
|
| | |
|
| | | private void BeforeWindowClose(Window window)
|
| | | private void AfterWindowClose(Window window)
|
| | | {
|
| | | if ("PetMatInfoWin" != window.name && "ItemInfoWin" != window.name) return;
|
| | |
|
| | | if (window.windowInfo.windowType >= WindowType.Modal)
|
| | | {
|
| | | if (!WindowCenter.Instance.ExistAnyFullScreenOrMaskWinLEqual(WindowType.Modal))
|
| | | {
|
| | | UI3DModelExhibition.Instance.ShowPlayer(m_Role, PlayerDatas.Instance.baseData.Job);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void UpdateSecond()
|
| | | {
|
| | |
| | | } |
| | | |
| | | #region 预览坐骑碎片属性 |
| | | Dictionary<int, int> mountAttrDict = new Dictionary<int, int>(); |
| | | |
| | | public Dictionary<int, int> GetMountAttrAddDict(int mountCode) |
| | | { |
| | | var mountAttrDict = new Dictionary<int, int>(); |
| | | HorseConfig horseConfig = HorseConfig.Get(mountCode); |
| | | mountAttrDict.Clear(); |
| | | if (horseConfig == null) return mountAttrDict; |
| | |
| | | } |
| | | return mountAttrDict; |
| | | }
|
| | |
|
| | | #endregion |
| | |
|
| | | #region 技能整合 |
| | |
| | | protected override void OnPreClose()
|
| | | {
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | UI3DTreasureExhibition.Instance.Stop();
|
| | | flying = false;
|
| | | }
|
| | |
|
| | |
| | | case ActivateShow.ActivateFunc.GodWeapon:
|
| | | m_ModelRawImage.gameObject.SetActive(true);
|
| | | m_ModelRawImage.rectTransform.sizeDelta = new Vector2(600, 600);
|
| | | UI3DTreasureExhibition.Instance.BeginShowGodWeapon(ActivateShow.godWeaponType, m_ModelRawImage);
|
| | | UI3DTreasureExhibition.Instance.ShowGodWeapon(ActivateShow.godWeaponType, m_ModelRawImage);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private void WindowBeforeCloseEvent(Window _window)
|
| | | {
|
| | | if (_window is PetMatInfoWin)
|
| | | if (_window is PetMountTipWin)
|
| | | {
|
| | | m_ContainerMounts.DisplayBossRawImage();
|
| | | m_ContainerSpiritPet.DisplayAnotherBossRawImage();
|
| | |
| | | ActivateShow.complelteFlySkillEvent -= ComplelteFlySkillEvent;
|
| | | AutoHammerWin.onConfirm -= OnAutoHammerConfirm;
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= BeforePlayerDataInitializeEvent;
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | UI3DTreasureExhibition.Instance.Stop();
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | |
| | | private void DisplayGodWeaponModel()
|
| | | {
|
| | | m_GodWeaponModel.gameObject.SetActive(true);
|
| | | UI3DTreasureExhibition.Instance.BeginShowGodWeapon(model.selectType, m_GodWeaponModel);
|
| | | UI3DTreasureExhibition.Instance.ShowGodWeapon(model.selectType, m_GodWeaponModel);
|
| | | }
|
| | |
|
| | | private bool TryGetGodWeaponType(int skillId, out int type, out int index)
|
| | |
| | |
|
| | | Color32 conditionColor = new Color32(255, 244, 205, 255);
|
| | | Color32 conditionRedColor = new Color32(255, 1, 1, 255);
|
| | | PetMatType matType = PetMatType.None;
|
| | | PetOrMount matType = PetOrMount.None;
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | {
|
| | | petSkillDict = null;
|
| | | mountSkillDict = null;
|
| | | matType = PetMatType.None;
|
| | | matType = PetOrMount.None;
|
| | | if (itemTipsModel.curAttrData == null) return;
|
| | |
|
| | | if (itemTipsModel.unlockPetDict.ContainsKey(itemTipsModel.curAttrData.itemId))
|
| | | {
|
| | | matType = PetMatType.Pet;
|
| | | matType = PetOrMount.Pet;
|
| | | }
|
| | | else if (itemTipsModel.unlockMountDict.ContainsKey(itemTipsModel.curAttrData.itemId))
|
| | | {
|
| | | matType = PetMatType.Mount;
|
| | | matType = PetOrMount.Mount;
|
| | | }
|
| | |
|
| | | SetTopUI();
|
| | |
| | | Dictionary<int, int> itemEffectDict = null;
|
| | | switch (matType)
|
| | | {
|
| | | case PetMatType.Pet:
|
| | | case PetOrMount.Pet:
|
| | | PetInfoConfig petInfo = itemTipsModel.unlockPetDict[itemTipsModel.curAttrData.itemId];
|
| | | itemEffectDict = petmodel.GetPetAttrAddDict(petInfo.ID);
|
| | | break;
|
| | | case PetMatType.Mount:
|
| | | case PetOrMount.Mount:
|
| | | HorseConfig horseConfig = itemTipsModel.unlockMountDict[itemTipsModel.curAttrData.itemId];
|
| | | itemEffectDict = mountModel.GetMountAttrAddDict(horseConfig.HorseID);
|
| | | break;
|
| | |
| | | {
|
| | | switch (matType)
|
| | | {
|
| | | case PetMatType.Pet:
|
| | | case PetOrMount.Pet:
|
| | | PetInfoConfig petInfo = itemTipsModel.unlockPetDict[itemTipsModel.curAttrData.itemId];
|
| | | petSkillDict = itemTipsModel.GetPetSkillDict(itemTipsModel.curAttrData.itemId);
|
| | | modelShow.SetModelShow(petInfo.ID, ModelShowType.pet, Language.Get("TreasureEffect103"), petInfo.ShowFightPower);
|
| | | modelShow.SetModelShow(petInfo.ID, ModelShowType.Pet, Language.Get("TreasureEffect103"), petInfo.ShowFightPower);
|
| | | break;
|
| | | case PetMatType.Mount:
|
| | | case PetOrMount.Mount:
|
| | | HorseConfig horseConfig = itemTipsModel.unlockMountDict[itemTipsModel.curAttrData.itemId];
|
| | | mountSkillDict = itemTipsModel.GetMountSkillDict(itemTipsModel.curAttrData.itemId);
|
| | | modelShow.SetModelShow(horseConfig.Model, ModelShowType.mount, Language.Get("TreasureEffect103"), horseConfig.ShowFightPower);
|
| | | modelShow.SetModelShow(horseConfig.Model, ModelShowType.Mount, Language.Get("TreasureEffect103"), horseConfig.ShowFightPower);
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | switch (_type)
|
| | | {
|
| | | case FunctionUnlockType.Treasure:
|
| | | UI3DTreasureExhibition.Instance.BeginShowTreasure(m_Id, m_TreasureIcon);
|
| | | UI3DTreasureExhibition.Instance.ShowTreasure(m_Id, m_TreasureIcon);
|
| | | originalScale = 9f;
|
| | | break;
|
| | | case FunctionUnlockType.Normal:
|
| | |
| | | originalScale = 1f;
|
| | | break;
|
| | | case FunctionUnlockType.TreasureFunc:
|
| | | UI3DTreasureExhibition.Instance.BeginShowTreasure(m_Id, m_TreasureIcon);
|
| | | UI3DTreasureExhibition.Instance.ShowTreasure(m_Id, m_TreasureIcon);
|
| | | originalScale = 9f;
|
| | | break;
|
| | | }
|
| | |
| | | case FunctionUnlockType.Treasure:
|
| | | case FunctionUnlockType.TreasureSkill:
|
| | | case FunctionUnlockType.TreasureFunc:
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | UI3DTreasureExhibition.Instance.Stop();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | UI3DTreasureExhibition.Instance.Stop();
|
| | | for (int i = 0; i < funcBtnlist.Count; i++)
|
| | | {
|
| | | if (i < treasureIdlist.Count)
|
| | |
| | |
|
| | | selectTreasureId = treasureId;
|
| | | hostModel.SetSelectTreasureId(treasureId);
|
| | | UI3DTreasureExhibition.Instance.BeginShowTreasure(selectTreasureId, treasureIcon);
|
| | | UI3DTreasureExhibition.Instance.ShowTreasure(selectTreasureId, treasureIcon);
|
| | | CreateConditionCell();
|
| | | functionOrder = index;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void BeginShowTreasure(int _treasureId, RawImage _rawImage)
|
| | | public void ShowTreasure(int _treasureId, RawImage _rawImage)
|
| | | {
|
| | | var instance = UI3DModelFactory.LoadUITreasure(_treasureId);
|
| | | if (instance == null)
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | StopShow();
|
| | | Stop();
|
| | |
|
| | | m_ShowCamera.enabled = true;
|
| | | m_TreasureId = _treasureId;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void BeginShowGodWeapon(int _type, RawImage _rawImage)
|
| | | public void ShowGodWeapon(int _type, RawImage _rawImage)
|
| | | {
|
| | | var instance = UI3DModelFactory.LoadUIGodWeapon(_type);
|
| | | if (instance == null)
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | StopShow();
|
| | | Stop();
|
| | |
|
| | | m_ShowCamera.enabled = true;
|
| | | m_GodWeaponType = _type;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void StopShow()
|
| | | public void Stop()
|
| | | {
|
| | | m_ShowCamera.enabled = false;
|
| | | if (effect != null)
|
| | |
| | | JadeDynastyTower = 23,//诛仙塔排行榜
|
| | | Def_BT_NewFCCostGold = 24, //消费排行榜(新仙界盛典) 24
|
| | | }
|
| | |
|
| | | public enum PetOrMount
|
| | | {
|
| | | None,
|
| | | Pet,
|
| | | Mount,
|
| | | } |