| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Tuesday, June 04, 2019 |
| | | // [ Date ]: Thursday, June 13, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | public readonly int FloorNum; |
| | | public readonly int MonsterType; |
| | | public readonly int[] RareItemID; |
| | | public readonly int[] NewItemIds; |
| | | public readonly int NewItemId; |
| | | public readonly string PortraitID; |
| | | |
| | | public BossHomeConfig() |
| | |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | } |
| | | |
| | | string[] NewItemIdsStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | NewItemIds = new int[NewItemIdsStringArray.Length]; |
| | | for (int i=0;i<NewItemIdsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(NewItemIdsStringArray[i],out NewItemIds[i]); |
| | | } |
| | | int.TryParse(tables[4],out NewItemId); |
| | | |
| | | PortraitID = tables[5]; |
| | | } |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9a48ce00a71cd9441af93f908b285a8a |
| | | timeCreated: 1559654244 |
| | | timeCreated: 1560428238 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Tuesday, June 04, 2019 |
| | | // [ Date ]: Thursday, June 13, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | public readonly int NPCID; |
| | | public readonly int MonsterType; |
| | | public readonly int[] RareItemID; |
| | | public readonly int[] NewItemIds; |
| | | public readonly int NewItemId; |
| | | public readonly string PortraitID; |
| | | |
| | | public CrossServerBossConfig() |
| | |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | } |
| | | |
| | | string[] NewItemIdsStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | NewItemIds = new int[NewItemIdsStringArray.Length]; |
| | | for (int i=0;i<NewItemIdsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(NewItemIdsStringArray[i],out NewItemIds[i]); |
| | | } |
| | | int.TryParse(tables[3],out NewItemId); |
| | | |
| | | PortraitID = tables[4]; |
| | | } |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 491a49720a0b723419eabda9d78d2741 |
| | | timeCreated: 1559654232 |
| | | timeCreated: 1560428525 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: Fish
|
| | | // [ Date ]: Tuesday, June 04, 2019
|
| | | // [ Date ]: Thursday, June 13, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | |
| | | public readonly string MustItemID;
|
| | | public readonly string MustItemDescriptions;
|
| | | public readonly int[] RareItemID;
|
| | | public readonly int[] NewItemIds;
|
| | | public readonly int NewItemId;
|
| | | public readonly string PortraitID;
|
| | | public readonly int SpecialItemMark;
|
| | | public readonly int CanEnterTimes;
|
| | |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | }
|
| | |
|
| | | string[] NewItemIdsStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | NewItemIds = new int[NewItemIdsStringArray.Length]; |
| | | for (int i=0;i<NewItemIdsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(NewItemIdsStringArray[i],out NewItemIds[i]); |
| | | }
|
| | | int.TryParse(tables[6],out NewItemId); |
| | |
|
| | | PortraitID = tables[7];
|
| | |
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 466bd77ae1300624fbf81f61d9ef6259 |
| | | timeCreated: 1559654347 |
| | | timeCreated: 1560428435 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Tuesday, June 04, 2019 |
| | | // [ Date ]: Thursday, June 13, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | public readonly int MonsterType; |
| | | public readonly int MonsterAnger; |
| | | public readonly int[] RareItemID; |
| | | public readonly int[] NewItemIds; |
| | | public readonly int NewItemId; |
| | | public readonly string PortraitID; |
| | | |
| | | public ElderGodAreaConfig() |
| | |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | } |
| | | |
| | | string[] NewItemIdsStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | NewItemIds = new int[NewItemIdsStringArray.Length]; |
| | | for (int i=0;i<NewItemIdsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(NewItemIdsStringArray[i],out NewItemIds[i]); |
| | | } |
| | | int.TryParse(tables[4],out NewItemId); |
| | | |
| | | PortraitID = tables[5]; |
| | | } |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a2d7a0aa4ee3d4145822c24a863e0161 |
| | | timeCreated: 1559654275 |
| | | timeCreated: 1560428505 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Thursday, June 13, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class NewDropItemGroupConfig |
| | | { |
| | | |
| | | public readonly int id; |
| | | public readonly Int2[] items; |
| | | public readonly string description; |
| | | |
| | | public NewDropItemGroupConfig() |
| | | { |
| | | } |
| | | |
| | | public NewDropItemGroupConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out id); |
| | | |
| | | string[] itemsStringArray = tables[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | items = new Int2[itemsStringArray.Length]; |
| | | for (int i=0;i<itemsStringArray.Length;i++) |
| | | { |
| | | Int2.TryParse(itemsStringArray[i],out items[i]); |
| | | } |
| | | |
| | | description = tables[2]; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, NewDropItemGroupConfig> configs = new Dictionary<string, NewDropItemGroupConfig>(); |
| | | public static NewDropItemGroupConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("NewDropItemGroupConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | NewDropItemGroupConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new NewDropItemGroupConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static NewDropItemGroupConfig Get(int id) |
| | | { |
| | | return Get(id.ToString()); |
| | | } |
| | | |
| | | public static List<string> GetKeys() |
| | | { |
| | | var keys = new List<string>(); |
| | | keys.AddRange(configs.Keys); |
| | | keys.AddRange(rawDatas.Keys); |
| | | return keys; |
| | | } |
| | | |
| | | public static List<NewDropItemGroupConfig> GetValues() |
| | | { |
| | | var values = new List<NewDropItemGroupConfig>(); |
| | | values.AddRange(configs.Values); |
| | | |
| | | var keys = new List<string>(rawDatas.Keys); |
| | | foreach (var key in keys) |
| | | { |
| | | values.Add(Get(key)); |
| | | } |
| | | |
| | | return values; |
| | | } |
| | | |
| | | public static bool Has(string id) |
| | | { |
| | | return configs.ContainsKey(id) || rawDatas.ContainsKey(id); |
| | | } |
| | | |
| | | public static bool Has(int id) |
| | | { |
| | | return Has(id.ToString()); |
| | | } |
| | | |
| | | public static bool inited { get; private set; } |
| | | protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>(); |
| | | public static void Init(bool sync=false) |
| | | { |
| | | inited = false; |
| | | var path = string.Empty; |
| | | if (AssetSource.refdataFromEditor) |
| | | { |
| | | path = ResourcesPath.CONFIG_FODLER +"/NewDropItemGroup.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/NewDropItemGroup.txt"); |
| | | } |
| | | |
| | | configs.Clear(); |
| | | var tempConfig = new NewDropItemGroupConfig(); |
| | | var preParse = tempConfig is IConfigPostProcess; |
| | | |
| | | if (sync) |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new NewDropItemGroupConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | inited = true; |
| | | } |
| | | else |
| | | { |
| | | ThreadPool.QueueUserWorkItem((object _object) => |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new NewDropItemGroupConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e5fbb08ebd44b7b40aefb188928fd8ec |
| | | timeCreated: 1560425753 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: Fish
|
| | | // [ Date ]: Tuesday, June 04, 2019
|
| | | // [ Date ]: Thursday, June 13, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | |
| | | public readonly int lineId;
|
| | | public readonly int[] MustItemID;
|
| | | public readonly int[] RareItemID;
|
| | | public readonly int[] NewItemIds;
|
| | | public readonly int NewItemId;
|
| | | public readonly string PortraitID;
|
| | |
|
| | | public PersonalBossConfig()
|
| | |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | }
|
| | |
|
| | | string[] NewItemIdsStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | NewItemIds = new int[NewItemIdsStringArray.Length]; |
| | | for (int i=0;i<NewItemIdsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(NewItemIdsStringArray[i],out NewItemIds[i]); |
| | | }
|
| | | int.TryParse(tables[4],out NewItemId); |
| | |
|
| | | PortraitID = tables[5];
|
| | | }
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: f73cc9f99bc29204fb20c8eecff4b111 |
| | | timeCreated: 1559654435 |
| | | timeCreated: 1560428468 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Tuesday, June 04, 2019 |
| | | // [ Date ]: Thursday, June 13, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public readonly int NPCID; |
| | | public readonly int[] RareItemID; |
| | | public readonly int[] NewItemIds; |
| | | public readonly int NewItemId; |
| | | public readonly int MapID; |
| | | public readonly string PortraitID; |
| | | |
| | |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | } |
| | | |
| | | string[] NewItemIdsStringArray = tables[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | NewItemIds = new int[NewItemIdsStringArray.Length]; |
| | | for (int i=0;i<NewItemIdsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(NewItemIdsStringArray[i],out NewItemIds[i]); |
| | | } |
| | | int.TryParse(tables[2],out NewItemId); |
| | | |
| | | int.TryParse(tables[3],out MapID); |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 334673b33563f5e4bbb8cfc77d3aaf1f |
| | | timeCreated: 1559646674 |
| | | timeCreated: 1560428454 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.Hide( ); |
| | | |
| | | |
| | | |
| | |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | using LitJson;
|
| | |
|
| | | namespace Snxxz.UI
|
| | |
| | |
|
| | | int[] undoubtedlyRewards = null;
|
| | | int[] unusualRewards = null;
|
| | | int[] newRewards = null;
|
| | | int newDropId = 0;
|
| | |
|
| | | switch (m_FindPreciousType)
|
| | | {
|
| | | case FindPreciousType.WorldBoss:
|
| | | undoubtedlyRewards = WorldBossConfig.Get(bossId).RareItemID;
|
| | | newRewards = WorldBossConfig.Get(bossId).NewItemIds;
|
| | | newDropId = WorldBossConfig.Get(bossId).NewItemId;
|
| | | break;
|
| | | case FindPreciousType.BossHome:
|
| | | undoubtedlyRewards = BossHomeConfig.Get(bossId).RareItemID;
|
| | | newRewards = BossHomeConfig.Get(bossId).NewItemIds;
|
| | | newDropId = BossHomeConfig.Get(bossId).NewItemId;
|
| | | break;
|
| | | case FindPreciousType.ElderGodArea:
|
| | | undoubtedlyRewards = ElderGodAreaConfig.Get(bossId).RareItemID;
|
| | | newRewards = ElderGodAreaConfig.Get(bossId).NewItemIds;
|
| | | newDropId = ElderGodAreaConfig.Get(bossId).NewItemId;
|
| | | break;
|
| | | case FindPreciousType.PersonalBoss:
|
| | | var personalBossConfig = PersonalBossConfig.Get(bossId);
|
| | | undoubtedlyRewards = personalBossConfig.MustItemID;
|
| | | unusualRewards = personalBossConfig.RareItemID;
|
| | | newRewards = personalBossConfig.NewItemIds;
|
| | | newDropId = personalBossConfig.NewItemId;
|
| | | break;
|
| | | case FindPreciousType.DemonJar:
|
| | | var demonJarConfig = DemonJarConfig.Get(bossId);
|
| | |
| | | }
|
| | | unusualRewards = demonJarConfig.RareItemID;
|
| | |
|
| | | newRewards = demonJarConfig.NewItemIds;
|
| | | newDropId = demonJarConfig.NewItemId;
|
| | | break;
|
| | | case FindPreciousType.CrossServerBoss:
|
| | | undoubtedlyRewards = CrossServerBossConfig.Get(bossId).RareItemID;
|
| | | newRewards = CrossServerBossConfig.Get(bossId).NewItemIds;
|
| | | newDropId = CrossServerBossConfig.Get(bossId).NewItemId;
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | if (undoubtedlyRewards != null && undoubtedlyRewards.Length > 0)
|
| | | {
|
| | | m_UndoubtedlyRewardGroup.gameObject.SetActive(true);
|
| | | m_UndoubtedlyRewardGroup.Display(undoubtedlyRewards, newRewards);
|
| | | m_UndoubtedlyRewardGroup.Display(newDropId, undoubtedlyRewards);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | if (unusualRewards != null && unusualRewards.Length > 0)
|
| | | {
|
| | | m_UnusualRewardGroup.gameObject.SetActive(true);
|
| | | m_UnusualRewardGroup.Display(unusualRewards , newRewards);
|
| | | m_UnusualRewardGroup.Display(0, unusualRewards);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | |
| | | public class FindPreciousRewardPreviewGroup : MonoBehaviour |
| | | { |
| | | [SerializeField] NewDropItemTrigger m_DropItemTrigger; |
| | | [SerializeField] FindPreciousItemBehaviour[] m_RewardBehaviours; |
| | | |
| | | public void Display(int[] rewards, int[] newRewards) |
| | | public void Display(int newDropId, int[] rewards) |
| | | { |
| | | if (newDropId>0) |
| | | { |
| | | m_DropItemTrigger.gameObject.SetActive(true); |
| | | m_DropItemTrigger.Display(newDropId); |
| | | } |
| | | else |
| | | { |
| | | m_DropItemTrigger.gameObject.SetActive(false); |
| | | } |
| | | |
| | | var length = rewards.Length; |
| | | for (int i = 0; i < m_RewardBehaviours.Length; i++) |
| | | { |
| | |
| | | behaviour.gameObject.SetActive(true); |
| | | var itemId = rewards[i]; |
| | | var count = 1; |
| | | var isNew = FindItemId(newRewards, itemId) != -1; |
| | | behaviour.Display(itemId, count, isNew); |
| | | behaviour.Display(itemId, count, false); |
| | | } |
| | | else |
| | | { |
| | | behaviour.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private int FindItemId(int[] set, int itemId) |
| | | { |
| | | if (!set.IsNullOrEmpty()) |
| | | { |
| | | for (var i = 0; i < set.Length; i++) |
| | | { |
| | | if (set[i] == itemId) |
| | | { |
| | | return i; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return -1; |
| | | } |
| | | |
| | | } |
| | |
| | | [XLua.LuaCallCSharp]
|
| | | public class RewardPreviewGroup : MonoBehaviour
|
| | | {
|
| | | [SerializeField]
|
| | | ItemBehaviour[] m_ItemBehaviours;
|
| | | [SerializeField] ItemBehaviour[] m_ItemBehaviours;
|
| | |
|
| | | public void Display(List<Item> _items)
|
| | | {
|
| | |
| | |
|
| | | Display(items);
|
| | | }
|
| | |
|
| | | public void Hide()
|
| | | {
|
| | | for (int i = 0; i < m_ItemBehaviours.Length; i++)
|
| | | {
|
| | | m_ItemBehaviours[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 39f2572164c65c442bdd235e04ef272a |
| | | folderAsset: yes |
| | | timeCreated: 1560425409 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, June 13, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class NewDropItemModel : Model |
| | | { |
| | | |
| | | public int newDropGroupId { get; set; } |
| | | |
| | | public override void Init() |
| | | { |
| | | } |
| | | |
| | | public override void UnInit() |
| | | { |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ae61cb9dd4a4e1340a27ff1dbe248448 |
| | | timeCreated: 1560425502 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, June 13, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class NewDropItemTrigger : MonoBehaviour |
| | | { |
| | | [SerializeField] Button m_Button; |
| | | |
| | | void Start() |
| | | { |
| | | m_Button.SetListener(() => |
| | | { |
| | | |
| | | |
| | | }); |
| | | } |
| | | |
| | | public void Display(int newDropId) |
| | | { |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c320a4d7e3eab92418b59313a9a9b83b |
| | | timeCreated: 1560425149 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, June 13, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class NewDropItemWin : Window |
| | | { |
| | | [SerializeField] Text m_Description; |
| | | [SerializeField] Item[] m_ItemBehaviours; |
| | | [SerializeField] Button m_Close; |
| | | |
| | | NewDropItemModel model { get { return ModelCenter.Instance.GetModel<NewDropItemModel>(); } } |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Close.SetListener(() => { WindowCenter.Instance.Close<NewDropItemWin>(); }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | DisplayDescription(); |
| | | DisplayItems(); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | private void DisplayDescription() |
| | | { |
| | | var config = NewDropItemGroupConfig.Get(model.newDropGroupId); |
| | | m_Description.text = config.description; |
| | | } |
| | | |
| | | private void DisplayItems() |
| | | { |
| | | var config = NewDropItemGroupConfig.Get(model.newDropGroupId); |
| | | for (var i = 0; i < m_ItemBehaviours.Length; i++) |
| | | { |
| | | var behaviour = m_ItemBehaviours[i]; |
| | | if (i < config.items.Length) |
| | | { |
| | | behaviour.root.gameObject.SetActive(true); |
| | | behaviour.Display(config.items[i].x, config.items[i].y); |
| | | } |
| | | else |
| | | { |
| | | behaviour.root.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public class Item |
| | | { |
| | | public Transform root; |
| | | public ItemBehaviour itemBehaviour; |
| | | public Text itemName; |
| | | |
| | | public void Display(int id, int count) |
| | | { |
| | | itemBehaviour.SetItem(id, count); |
| | | var config = ItemConfig.Get(id); |
| | | itemName.text = config.ItemName; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 10879f3516cea114c8c20694041ef9e3 |
| | | timeCreated: 1560425476 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | normalTasks.Add(new ConfigInitTask("TaskFeedbackFuncConfig", () => { TaskFeedbackFuncConfig.Init(); }, () => { return TaskFeedbackFuncConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("VipPrivilegeInfoConfig", () => { VipPrivilegeInfoConfig.Init(); }, () => { return VipPrivilegeInfoConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("SpiritWeaponPropertyConfig", () => { SpiritWeaponPropertyConfig.Init(); }, () => { return SpiritWeaponPropertyConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("NewDropItemGroupConfig", () => { NewDropItemGroupConfig.Init(); }, () => { return NewDropItemGroupConfig.inited; }));
|
| | | } |
| | | |
| | | static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>(); |