| System/Equip.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Equip/EquipModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Equip/EquipModel.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Equip/EquipSet.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Equip/EquipSet.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Equip/EquipSlot.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Equip/EquipSlot.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/WindowBase/ModelCenter.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/Equip.meta
New file @@ -0,0 +1,9 @@ fileFormatVersion: 2 guid: 408cda0fe9174ca4eac9ce32502fdcb0 folderAsset: yes timeCreated: 1551096728 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant: System/Equip/EquipModel.cs
New file @@ -0,0 +1,24 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Snxxz.UI { public class EquipModel : Model { Dictionary<int, EquipSet> equipSets = new Dictionary<int, EquipSet>(); public override void Init() { } public override void UnInit() { } } } System/Equip/EquipModel.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: f3ee6b5bd5b76714b87a241feedd3937 timeCreated: 1551096748 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Equip/EquipSet.cs
New file @@ -0,0 +1,160 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Snxxz.UI { public class EquipSet { public readonly int level; public bool unLocked { get; set; } Redpoint redpoint = new Redpoint(1); Dictionary<int, EquipSlot> equipSlots = new Dictionary<int, EquipSlot>(); public EquipSet(int level) { this.level = level; } public void UnLock() { } public void UpdateEquipSlots() { } public bool IsSlotUnLocked(int place) { if (!equipSlots.ContainsKey(place)) { return false; } return equipSlots[place].unLocked; } public int GetStarLevel(int place) { if (!equipSlots.ContainsKey(place)) { return 0; } return equipSlots[place].starLevel; } public ItemModel GetEquip(int place) { if (!equipSlots.ContainsKey(place)) { return null; } return equipSlots[place].equip; } public void PutOn(int place, ItemModel item) { if (item == null) { return; } if (!equipSlots.ContainsKey(place)) { return; } var slot = equipSlots[place]; if (!slot.unLocked) { return; } if (!IsPlaceCompatible(place, item.equipPlace)) { return; } slot.equip = item; } public void TakeOff(int place) { if (!equipSlots.ContainsKey(place)) { return; } var slot = equipSlots[place]; slot.equip = null; } public void UpdateStarLevel(int place, int starLevel) { if (!equipSlots.ContainsKey(place)) { return; } var slot = equipSlots[place]; slot.starLevel = starLevel; } public void UnLockSlot(int place) { if (!equipSlots.ContainsKey(place)) { return; } var slot = equipSlots[place]; if (slot.unLocked) { return; } slot.unLocked = true; } public bool IsBetterThanCurrent(ItemModel item) { var place = item.equipPlace; if (!equipSlots.ContainsKey(place)) { return false; } var slot = equipSlots[place]; if (slot.unLocked) { return false; } var currentEquip = slot.equip; if (currentEquip == null) { return true; } return item.equipScore >= currentEquip.equipScore; } private bool IsPlaceCompatible(int slotPlace, int equipPlace) { slotPlace = slotPlace == 10 ? 9 : slotPlace; equipPlace = equipPlace == 10 ? 9 : equipPlace; return slotPlace == equipPlace; } } } System/Equip/EquipSet.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 5e6ca401fb2c59844b89e981c4a58bc0 timeCreated: 1551096917 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Equip/EquipSlot.cs
New file @@ -0,0 +1,16 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Snxxz.UI { public class EquipSlot { public bool unLocked { get; set; } public int starLevel { get; set; } public ItemModel equip { get; set; } } } System/Equip/EquipSlot.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: e1fa9aacd2e109c4c954083ce08738e4 timeCreated: 1551097235 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/WindowBase/ModelCenter.cs
@@ -229,6 +229,7 @@ RegisterModel<NewYearFairylandCeremonyModel>(); RegisterModel<JadeDynastyGemModel>(); RegisterModel<LuckyTreasureModel>(); RegisterModel<EquipModel>(); inited = true; }