Merge branch 'master' into TreasureRevise
Conflicts:
System/Treasure/TreasureComponent.cs
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Tuesday, February 19, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class GemItemConfig |
| | | { |
| | | |
| | | public readonly int ID; |
| | | public readonly int Type; |
| | | |
| | | public GemItemConfig() |
| | | { |
| | | } |
| | | |
| | | public GemItemConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | | int.TryParse(tables[1],out Type); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, GemItemConfig> configs = new Dictionary<string, GemItemConfig>(); |
| | | public static GemItemConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("GemItemConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | GemItemConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new GemItemConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static GemItemConfig 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<GemItemConfig> GetValues() |
| | | { |
| | | var values = new List<GemItemConfig>(); |
| | | 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 +"/GemItem.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/GemItem.txt"); |
| | | } |
| | | |
| | | var tempConfig = new GemItemConfig(); |
| | | 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 GemItemConfig(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 GemItemConfig(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: f710d587358c1a244aad12e7c6b2ea1c |
| | | timeCreated: 1550556087 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Tuesday, February 19, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class SkillClassifingConfig |
| | | { |
| | | |
| | | public readonly int SkillID; |
| | | public readonly int SkillTypeID; |
| | | public readonly int UseType; |
| | | public readonly int FuncType; |
| | | public readonly int SkillLV; |
| | | |
| | | public SkillClassifingConfig() |
| | | { |
| | | } |
| | | |
| | | public SkillClassifingConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out SkillID); |
| | | |
| | | int.TryParse(tables[1],out SkillTypeID); |
| | | |
| | | int.TryParse(tables[2],out UseType); |
| | | |
| | | int.TryParse(tables[3],out FuncType); |
| | | |
| | | int.TryParse(tables[4],out SkillLV); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, SkillClassifingConfig> configs = new Dictionary<string, SkillClassifingConfig>(); |
| | | public static SkillClassifingConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("SkillClassifingConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | SkillClassifingConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new SkillClassifingConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static SkillClassifingConfig 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<SkillClassifingConfig> GetValues() |
| | | { |
| | | var values = new List<SkillClassifingConfig>(); |
| | | 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 +"/SkillClassifing.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/SkillClassifing.txt"); |
| | | } |
| | | |
| | | var tempConfig = new SkillClassifingConfig(); |
| | | 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 SkillClassifingConfig(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 SkillClassifingConfig(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: 0d490745b50975a4aabd218256cecdd4 |
| | | timeCreated: 1550560781 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | |
|
| | | public partial class ItemConfig : IConfigPostProcess
|
| | | public partial class ItemConfig
|
| | | {
|
| | | public static Dictionary<int, ItemConfig> tag_Wings = new Dictionary<int, ItemConfig>();//用来存储所有翅膀所需的Tpye
|
| | | private static Dictionary<int, ItemConfig> m_GemCfgs = new Dictionary<int, ItemConfig>();
|
| | | private const int GEM_TYPE_VALUE = 225;
|
| | |
|
| | | public void OnConfigParseCompleted()
|
| | | public static void GemItemInit()
|
| | | {
|
| | | switch (Type)
|
| | | GemItemConfig.Init(true);
|
| | | var keys = GemItemConfig.GetKeys();
|
| | | foreach (var key in keys)
|
| | | {
|
| | | case 25:
|
| | | case 140:
|
| | | if (Effect1 == GEM_TYPE_VALUE)
|
| | | {
|
| | | m_GemCfgs.Add(EffectValueB1 * 1000 + EffectValueA1, this);
|
| | | }
|
| | | break;
|
| | | case 111:
|
| | | case 39:
|
| | | case 52:
|
| | | tag_Wings.Add(ID, this);
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | var config = ItemConfig.Get(key);
|
| | | m_GemCfgs.Add(config.EffectValueB1 * 1000 + config.EffectValueA1, config);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | m_GemCfgs.TryGetValue(level * 1000 + type, out item);
|
| | | return item;
|
| | | }
|
| | |
|
| | | public static bool IsWing(int itemId)
|
| | | {
|
| | | var config = ItemConfig.Get(itemId);
|
| | | return config != null && (config.Type == 111 || config.Type == 39 || config.Type == 52);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using System.Threading;
|
| | |
|
| | | public partial class SkillConfig : IConfigPostProcess
|
| | | public partial class SkillConfig
|
| | | {
|
| | | static Dictionary<int, int> horseSkills = new Dictionary<int, int>();
|
| | | /// <summary>
|
| | | /// 根据职业以及技能类型存储技能
|
| | | /// </summary>
|
| | | private static Dictionary<int, Dictionary<int, Dictionary<int, List<SkillConfig>>>> m_Skills = new Dictionary<int, Dictionary<int, Dictionary<int, List<SkillConfig>>>>();
|
| | | private static Dictionary<int, Dictionary<int, Dictionary<int, List<int>>>> m_Skills = new Dictionary<int, Dictionary<int, Dictionary<int, List<int>>>>();
|
| | |
|
| | | public void OnConfigParseCompleted()
|
| | | public static void SkillClassifingInit()
|
| | | {
|
| | | #region 根据职业以及技能类型以及技能等级
|
| | | Dictionary<int, Dictionary<int, List<SkillConfig>>> funcDic = null;
|
| | | Dictionary<int, List<SkillConfig>> typeDic = null;
|
| | | List<SkillConfig> lvlist = null;
|
| | | m_Skills.TryGetValue(UseType, out funcDic);
|
| | | if (funcDic != null)
|
| | | SkillClassifingConfig.Init(true);
|
| | | var configs = SkillClassifingConfig.GetValues();
|
| | | foreach (var config in configs)
|
| | | {
|
| | | funcDic.TryGetValue(FuncType, out typeDic);
|
| | | if (typeDic != null)
|
| | | var UseType = config.UseType;
|
| | | var FuncType = config.FuncType;
|
| | | var SkillTypeID = config.SkillTypeID;
|
| | | var SkillID = config.SkillID;
|
| | | var SkillLV = config.SkillLV;
|
| | |
|
| | | if (FuncType == 5)
|
| | | {
|
| | | typeDic.TryGetValue(SkillTypeID, out lvlist);
|
| | | if (lvlist != null)
|
| | | horseSkills.Add(SkillTypeID * 1000 + SkillLV, SkillID);
|
| | | }
|
| | |
|
| | | Dictionary<int, Dictionary<int, List<int>>> funcDic = null;
|
| | | Dictionary<int, List<int>> typeDic = null;
|
| | | List<int> lvlist = null;
|
| | | m_Skills.TryGetValue(UseType, out funcDic);
|
| | | if (funcDic != null)
|
| | | {
|
| | | funcDic.TryGetValue(FuncType, out typeDic);
|
| | | if (typeDic != null)
|
| | | {
|
| | | lvlist.Add(this);
|
| | | typeDic.TryGetValue(SkillTypeID, out lvlist);
|
| | | if (lvlist != null)
|
| | | {
|
| | | lvlist.Add(SkillID);
|
| | | }
|
| | | else
|
| | | {
|
| | | lvlist = new List<int>();
|
| | | lvlist.Add(SkillID);
|
| | | typeDic.Add(SkillTypeID, lvlist);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | lvlist = new List<SkillConfig>();
|
| | | lvlist.Add(this);
|
| | | typeDic = new Dictionary<int, List<int>>();
|
| | | lvlist = new List<int>();
|
| | | lvlist.Add(SkillID);
|
| | | typeDic.Add(SkillTypeID, lvlist);
|
| | | funcDic.Add(FuncType, typeDic);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | typeDic = new Dictionary<int, List<SkillConfig>>();
|
| | | lvlist = new List<SkillConfig>();
|
| | | lvlist.Add(this);
|
| | | funcDic = new Dictionary<int, Dictionary<int, List<int>>>();
|
| | | typeDic = new Dictionary<int, List<int>>();
|
| | | lvlist = new List<int>();
|
| | | lvlist.Add(SkillID);
|
| | | typeDic.Add(SkillTypeID, lvlist);
|
| | | funcDic.Add(FuncType, typeDic);
|
| | | m_Skills.Add(UseType, funcDic);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | funcDic = new Dictionary<int, Dictionary<int, List<SkillConfig>>>();
|
| | | typeDic = new Dictionary<int, List<SkillConfig>>();
|
| | | lvlist = new List<SkillConfig>();
|
| | | lvlist.Add(this);
|
| | | typeDic.Add(SkillTypeID, lvlist);
|
| | | funcDic.Add(FuncType, typeDic);
|
| | | m_Skills.Add(UseType, funcDic);
|
| | | }
|
| | | #endregion
|
| | | #region 坐骑技能获取
|
| | | if (FuncType == 5)
|
| | | {
|
| | | horseSkills.Add(SkillTypeID*1000+SkillLV, this);
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | |
|
| | | static Dictionary<int, SkillConfig> horseSkills = new Dictionary<int, SkillConfig>();
|
| | |
|
| | | /// <summary>
|
| | | /// 根据职业类型以及技能类型获取技能
|
| | |
| | | /// <param name="occupy"></param>
|
| | | /// <param name="type"></param>
|
| | | /// <returns></returns>
|
| | | public static Dictionary<int, List<SkillConfig>> GetSkillWithOccpyAndType(int occupy, int type)
|
| | | public static Dictionary<int, List<int>> GetSkillWithOccpyAndType(int occupy, int type)
|
| | | {
|
| | | Dictionary<int, Dictionary<int, List<SkillConfig>>> dic = null;
|
| | | Dictionary<int, List<SkillConfig>> typeDic = null;
|
| | | Dictionary<int, Dictionary<int, List<int>>> dic = null;
|
| | | Dictionary<int, List<int>> typeDic = null;
|
| | | m_Skills.TryGetValue(occupy, out dic);
|
| | | if (dic != null)
|
| | | {
|
| | |
| | | return typeDic;
|
| | | }
|
| | |
|
| | | public static List<SkillConfig> GetSkillActConfigs(int occupy, int type, int _typeId)
|
| | | public static List<int> GetSkills(int occupy, int type, int _typeId)
|
| | | {
|
| | | List<SkillConfig> _list = null;
|
| | | Dictionary<int, List<SkillConfig>> _dict = GetSkillWithOccpyAndType(occupy, type);
|
| | | List<int> _list = null;
|
| | | Dictionary<int, List<int>> _dict = GetSkillWithOccpyAndType(occupy, type);
|
| | | if (_dict != null)
|
| | | {
|
| | | _dict.TryGetValue(_typeId, out _list);
|
| | |
| | | return _list;
|
| | | }
|
| | |
|
| | | public static Dictionary<int, Dictionary<int, List<SkillConfig>>> GetSkillActive(int occupy)
|
| | | public static Dictionary<int, Dictionary<int, List<int>>> GetSkillActive(int occupy)
|
| | | {
|
| | | Dictionary<int, Dictionary<int, List<SkillConfig>>> dic = null;
|
| | | Dictionary<int, Dictionary<int, List<int>>> dic = null;
|
| | | m_Skills.TryGetValue(occupy, out dic);
|
| | | return dic;
|
| | | }
|
| | |
| | | //------坐骑技能获取
|
| | | public static SkillConfig GetSkillTypeIDAndSkillLV(int typeId, int level)
|
| | | {
|
| | | SkillConfig skillConfig = null;
|
| | | horseSkills.TryGetValue(typeId * 1000 + level, out skillConfig);
|
| | | return skillConfig;
|
| | | var skillId = 0;
|
| | | horseSkills.TryGetValue(typeId * 1000 + level, out skillId);
|
| | | return SkillConfig.Get(skillId);
|
| | | }
|
| | |
|
| | | public static int FindSkillByJob(int[] skillIds, int job)
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 722e5e3d30096674e811f5bd191246a0 |
| | | folderAsset: yes |
| | | timeCreated: 1539228128 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| 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: |
| | |
| | | readonly static string PREFAB_EXTERSION = ".prefab";
|
| | | readonly static string SPRITE_EXTERSION = ".png";
|
| | |
|
| | | public static GameObject LoadWindow(string _name)
|
| | | public static GameObject LoadWindow(string name)
|
| | | {
|
| | | GameObject window = null;
|
| | | if (AssetSource.uiFromEditor)
|
| | | {
|
| | | #if UNITY_EDITOR
|
| | | var isPriority = PriorityWindowConfig.Get().priorityWindows.Contains(_name);
|
| | | var isPriority = PriorityWindowConfig.Get().priorityWindows.Contains(name);
|
| | |
|
| | | var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
|
| | | isPriority ? ResourcesPath.UI_PRIORITYWINDOW_SUFFIX : ResourcesPath.UI_WINDOW_SUFFIX, "/",
|
| | | _name,
|
| | | name,
|
| | | PREFAB_EXTERSION);
|
| | |
|
| | | window = UnityEditor.AssetDatabase.LoadAssetAtPath<GameObject>(path);
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var isPriority = PriorityWindowConfig.Get().priorityWindows.Contains(_name);
|
| | | var bundleName = isPriority ? ResourcesPath.UI_PRIORITYWINDOW_SUFFIX.ToLower() : ResourcesPath.UI_WINDOW_SUFFIX.ToLower();
|
| | | var assetInfo = new AssetInfo(bundleName, _name);
|
| | | var isPriority = PriorityWindowConfig.Get().priorityWindows.Contains(name);
|
| | | var bundleName = isPriority ? "ui/prioritywindow" : "ui/window";
|
| | | var assetInfo = new AssetInfo(bundleName, name);
|
| | |
|
| | | window = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as GameObject;
|
| | | }
|
| | |
|
| | | if (window == null)
|
| | | {
|
| | | DebugEx.LogErrorFormat("UILoader.LoadWindow() => 加载不到资源: {0}.", _name);
|
| | | DebugEx.LogErrorFormat("UILoader.LoadWindow() => 加载不到资源: {0}.", name);
|
| | | }
|
| | |
|
| | | return window;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public static GameObject LoadTreasure(string folder, string name)
|
| | | {
|
| | | GameObject prefab = null;
|
| | | if (AssetSource.uiFromEditor)
|
| | | {
|
| | | #if UNITY_EDITOR
|
| | | var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
|
| | | "UI/Treasure/", folder, "/",
|
| | | name,
|
| | | PREFAB_EXTERSION);
|
| | |
|
| | | prefab = UnityEditor.AssetDatabase.LoadAssetAtPath<GameObject>(path);
|
| | | #endif
|
| | | }
|
| | | else
|
| | | {
|
| | | var bundleName = StringUtility.Contact("ui/treasure/", folder).ToLower();
|
| | | var assetInfo = new AssetInfo(bundleName, name);
|
| | |
|
| | | prefab = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as GameObject;
|
| | | }
|
| | |
|
| | | if (prefab == null)
|
| | | {
|
| | | DebugEx.LogErrorFormat("UILoader.LoadPrefab() => 加载不到资源: {0}.", name);
|
| | | }
|
| | |
|
| | | return prefab;
|
| | | }
|
| | |
|
| | | public static void UnLoadTreasure(string folder, string _assetName)
|
| | | {
|
| | | if (!AssetSource.uiFromEditor)
|
| | | {
|
| | | AssetBundleUtility.Instance.UnloadAsset(StringUtility.Contact("ui/treasure/", folder).ToLower(), _assetName);
|
| | | }
|
| | | }
|
| | |
|
| | | public static GameObject LoadGodWeapon(string _name)
|
| | | {
|
| | | GameObject prefab = null;
|
| | | if (AssetSource.uiFromEditor)
|
| | | {
|
| | | #if UNITY_EDITOR
|
| | | var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
|
| | | "UI/Weapon/",
|
| | | _name,
|
| | | PREFAB_EXTERSION);
|
| | |
|
| | | prefab = UnityEditor.AssetDatabase.LoadAssetAtPath<GameObject>(path);
|
| | | #endif
|
| | | }
|
| | | else
|
| | | {
|
| | | var bundleName = "ui/weapon";
|
| | | var assetInfo = new AssetInfo(bundleName, _name);
|
| | | prefab = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as GameObject;
|
| | | }
|
| | |
|
| | | if (prefab == null)
|
| | | {
|
| | | DebugEx.LogErrorFormat("UILoader.LoadGodWeapon() => 加载不到资源: {0}.", _name);
|
| | | }
|
| | |
|
| | | return prefab;
|
| | | }
|
| | |
|
| | | public static GameObject LoadBossShow(string _name)
|
| | | {
|
| | | GameObject prefab = null;
|
| | | if (AssetSource.uiFromEditor)
|
| | | {
|
| | | #if UNITY_EDITOR
|
| | | var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
|
| | | "UI/BossShow/",
|
| | | _name,
|
| | | PREFAB_EXTERSION);
|
| | |
|
| | | prefab = UnityEditor.AssetDatabase.LoadAssetAtPath<GameObject>(path);
|
| | | #endif
|
| | | }
|
| | | else
|
| | | {
|
| | | var bundleName = "ui/bossshow";
|
| | | var assetInfo = new AssetInfo(bundleName, _name);
|
| | | prefab = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as GameObject;
|
| | | }
|
| | |
|
| | | if (prefab == null)
|
| | | {
|
| | | DebugEx.LogErrorFormat("UILoader.LoadBossShow() => 加载不到资源: {0}.", _name);
|
| | | }
|
| | |
|
| | | return prefab;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | GameObjectPoolManager.Instance.CacheGameObject(_prefab, 1, false);
|
| | | _prefab = InstanceResourcesLoader.LoadEffect(_actorShowConfig.uieffect);
|
| | | GameObjectPoolManager.Instance.CacheGameObject(_prefab, 1, false);
|
| | | UILoader.LoadPrefab(_actorShowConfig.cam);
|
| | | UILoader.LoadBossShow(_actorShowConfig.cam);
|
| | |
|
| | | _actorShowConfig = ActorShowConfig.Get(12);
|
| | |
|
| | |
| | | GameObjectPoolManager.Instance.CacheGameObject(_prefab, 1, false);
|
| | | _prefab = InstanceResourcesLoader.LoadEffect(_actorShowConfig.uieffect);
|
| | | GameObjectPoolManager.Instance.CacheGameObject(_prefab, 1, false);
|
| | | UILoader.LoadPrefab(_actorShowConfig.cam);
|
| | | UILoader.LoadBossShow(_actorShowConfig.cam);
|
| | | }
|
| | |
|
| | | public void HandleNewPlayerMission(H0820_tagMissionDict h0820)
|
| New file |
| | |
| | | #if USE_UNI_LUA |
| | | using LuaAPI = UniLua.Lua; |
| | | using RealStatePtr = UniLua.ILuaState; |
| | | using LuaCSFunction = UniLua.CSharpFunctionDelegate; |
| | | #else |
| | | using LuaAPI = XLua.LuaDLL.Lua; |
| | | using RealStatePtr = System.IntPtr; |
| | | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; |
| | | #endif |
| | | |
| | | using XLua; |
| | | using System.Collections.Generic; |
| | | |
| | | |
| | | namespace XLua.CSObjectWrap |
| | | { |
| | | using Utils = XLua.Utils; |
| | | public class GemItemConfigWrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(GemItemConfig); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 2, 0); |
| | | |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "ID", _g_get_ID); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "Type", _g_get_Type); |
| | | |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 6, 1, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Get", _m_Get_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetKeys", _m_GetKeys_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetValues", _m_GetValues_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Has", _m_Has_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Init", _m_Init_xlua_st_); |
| | | |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "inited", _g_get_inited); |
| | | |
| | | |
| | | |
| | | Utils.EndClassRegister(type, L, translator); |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __CreateInstance(RealStatePtr L) |
| | | { |
| | | |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | if(LuaAPI.lua_gettop(L) == 1) |
| | | { |
| | | |
| | | GemItemConfig gen_ret = new GemItemConfig(); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | return 1; |
| | | } |
| | | if(LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) |
| | | { |
| | | string _input = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | GemItemConfig gen_ret = new GemItemConfig(_input); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } |
| | | catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return LuaAPI.luaL_error(L, "invalid arguments to GemItemConfig constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Get_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) |
| | | { |
| | | int _id = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | GemItemConfig gen_ret = GemItemConfig.Get( _id ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)) |
| | | { |
| | | string _id = LuaAPI.lua_tostring(L, 1); |
| | | |
| | | GemItemConfig gen_ret = GemItemConfig.Get( _id ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to GemItemConfig.Get!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetKeys_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | System.Collections.Generic.List<string> gen_ret = GemItemConfig.GetKeys( ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetValues_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | System.Collections.Generic.List<GemItemConfig> gen_ret = GemItemConfig.GetValues( ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Has_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) |
| | | { |
| | | int _id = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | bool gen_ret = GemItemConfig.Has( _id ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)) |
| | | { |
| | | string _id = LuaAPI.lua_tostring(L, 1); |
| | | |
| | | bool gen_ret = GemItemConfig.Has( _id ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to GemItemConfig.Has!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Init_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 1&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1)) |
| | | { |
| | | bool _sync = LuaAPI.lua_toboolean(L, 1); |
| | | |
| | | GemItemConfig.Init( _sync ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 0) |
| | | { |
| | | |
| | | GemItemConfig.Init( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to GemItemConfig.Init!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_inited(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | LuaAPI.lua_pushboolean(L, GemItemConfig.inited); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_ID(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | GemItemConfig gen_to_be_invoked = (GemItemConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ID); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_Type(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | GemItemConfig gen_to_be_invoked = (GemItemConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Type); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2157b338ccbdff24abb78f3c253ad800 |
| | | timeCreated: 1550556878 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(ItemConfig); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 1, 70, 0); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 70, 0); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnConfigParseCompleted", _m_OnConfigParseCompleted); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "ID", _g_get_ID); |
| | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 7, 2, 1); |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 9, 1, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Get", _m_Get_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetKeys", _m_GetKeys_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetValues", _m_GetValues_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Has", _m_Has_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Init", _m_Init_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GemItemInit", _m_GemItemInit_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetGemDataByLevelAndType", _m_GetGemDataByLevelAndType_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "IsWing", _m_IsWing_xlua_st_); |
| | | |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "inited", _g_get_inited); |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "tag_Wings", _g_get_tag_Wings); |
| | | |
| | | Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "tag_Wings", _s_set_tag_Wings); |
| | | |
| | | |
| | | |
| | | Utils.EndClassRegister(type, L, translator); |
| | | } |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_OnConfigParseCompleted(RealStatePtr L) |
| | | static int _m_GemItemInit_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | ItemConfig gen_to_be_invoked = (ItemConfig)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.OnConfigParseCompleted( ); |
| | | ItemConfig.GemItemInit( ); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | ItemConfig gen_ret = ItemConfig.GetGemDataByLevelAndType( _level, _type ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_IsWing_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | int _itemId = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | bool gen_ret = ItemConfig.IsWing( _itemId ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_tag_Wings(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | translator.Push(L, ItemConfig.tag_Wings); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_tag_Wings(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | ItemConfig.tag_Wings = (System.Collections.Generic.Dictionary<int, ItemConfig>)translator.GetObject(L, 1, typeof(System.Collections.Generic.Dictionary<int, ItemConfig>)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9a7ec13708152e7428d792e498b67354 |
| | | timeCreated: 1550368559 |
| | | timeCreated: 1550541197 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Has", _m_Has_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Init", _m_Init_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSkillWithOccpyAndType", _m_GetSkillWithOccpyAndType_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSkillActConfigs", _m_GetSkillActConfigs_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSkills", _m_GetSkills_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSkillActive", _m_GetSkillActive_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetSkillTypeIDAndSkillLV", _m_GetSkillTypeIDAndSkillLV_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "FindSkillByJob", _m_FindSkillByJob_xlua_st_); |
| | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.OnConfigParseCompleted( ); |
| | | |
| | | |
| | | |
| | |
| | | int _occupy = LuaAPI.xlua_tointeger(L, 1); |
| | | int _type = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<SkillConfig>> gen_ret = SkillConfig.GetSkillWithOccpyAndType( _occupy, _type ); |
| | | System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<int>> gen_ret = SkillConfig.GetSkillWithOccpyAndType( _occupy, _type ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetSkillActConfigs_xlua_st_(RealStatePtr L) |
| | | static int _m_GetSkills_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | |
| | | int _type = LuaAPI.xlua_tointeger(L, 2); |
| | | int __typeId = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | System.Collections.Generic.List<SkillConfig> gen_ret = SkillConfig.GetSkillActConfigs( _occupy, _type, __typeId ); |
| | | System.Collections.Generic.List<int> gen_ret = SkillConfig.GetSkills( _occupy, _type, __typeId ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | |
| | | { |
| | | int _occupy = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<SkillConfig>>> gen_ret = SkillConfig.GetSkillActive( _occupy ); |
| | | System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<int>>> gen_ret = SkillConfig.GetSkillActive( _occupy ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 10, 0, 0); |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 14, 0, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadWindow", _m_LoadWindow_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadWindowAsync", _m_LoadWindowAsync_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "UnLoadWindowAsset", _m_UnLoadWindowAsset_xlua_st_); |
| | |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "UnLoadSprite", _m_UnLoadSprite_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadFont", _m_LoadFont_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "UnLoadFont", _m_UnLoadFont_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadTreasure", _m_LoadTreasure_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "UnLoadTreasure", _m_UnLoadTreasure_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadGodWeapon", _m_LoadGodWeapon_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "LoadBossShow", _m_LoadBossShow_xlua_st_); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | { |
| | | string __name = LuaAPI.lua_tostring(L, 1); |
| | | string _name = LuaAPI.lua_tostring(L, 1); |
| | | |
| | | UnityEngine.GameObject gen_ret = UILoader.LoadWindow( __name ); |
| | | UnityEngine.GameObject gen_ret = UILoader.LoadWindow( _name ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_LoadTreasure_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | string _folder = LuaAPI.lua_tostring(L, 1); |
| | | string _name = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | UnityEngine.GameObject gen_ret = UILoader.LoadTreasure( _folder, _name ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UnLoadTreasure_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | string _folder = LuaAPI.lua_tostring(L, 1); |
| | | string __assetName = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | UILoader.UnLoadTreasure( _folder, __assetName ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_LoadGodWeapon_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | string __name = LuaAPI.lua_tostring(L, 1); |
| | | |
| | | UnityEngine.GameObject gen_ret = UILoader.LoadGodWeapon( __name ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_LoadBossShow_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | string __name = LuaAPI.lua_tostring(L, 1); |
| | | |
| | | UnityEngine.GameObject gen_ret = UILoader.LoadBossShow( __name ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | translator.DelayWrapLoader(typeof(GatherSoulPropertyConfig), GatherSoulPropertyConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(GemItemConfig), GemItemConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(GetItemWaysConfig), GetItemWaysConfigWrap.__Register); |
| | | |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(ItemPlusSumAttrConfig), ItemPlusSumAttrConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(JadeDynastyBossConfig), JadeDynastyBossConfigWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit2(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(JadeDynastyBossConfig), JadeDynastyBossConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(JadeDynastyStoneAttrConfig), JadeDynastyStoneAttrConfigWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(RankListConfig), RankListConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(RealmConfig), RealmConfigWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit3(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(RealmConfig), RealmConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(RealmPracticeConfig), RealmPracticeConfigWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(WingRefineExpConfig), WingRefineExpConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(WorldBossConfig), WorldBossConfigWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit4(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(WorldBossConfig), WorldBossConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(XBGetItemConfig), XBGetItemConfigWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.Transform), UnityEngineTransformWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.Resources), UnityEngineResourcesWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit5(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.Resources), UnityEngineResourcesWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.TextAsset), UnityEngineTextAssetWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.Dungeon), SnxxzUIDungeonWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.DungeonLiquidModel), SnxxzUIDungeonLiquidModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit6(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.DungeonLiquidModel), SnxxzUIDungeonLiquidModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.DungeonModel), SnxxzUIDungeonModelWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.KingTreasureShowModel), SnxxzUIKingTreasureShowModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(KnapSackEventMgr), KnapSackEventMgrWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit7(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(KnapSackEventMgr), KnapSackEventMgrWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.CrossServerLogin), SnxxzUICrossServerLoginWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RoleModel), SnxxzUIRoleModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RolePointModel), SnxxzUIRolePointModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit8(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RolePointModel), SnxxzUIRolePointModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.TitleModel), SnxxzUITitleModelWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.MultipleExpModel), SnxxzUIMultipleExpModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.MultipleRealmPointModel), SnxxzUIMultipleRealmPointModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit9(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.MultipleRealmPointModel), SnxxzUIMultipleRealmPointModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.OperationTimeHepler), SnxxzUIOperationTimeHeplerWrap.__Register); |
| | | |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 76ab9fef6104ded43916de2a746cc1bb |
| | | timeCreated: 1550368559 |
| | | timeCreated: 1550541197 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | <type fullname="GatherSoulComposeConfig" preserve="all"/> |
| | | <type fullname="GatherSoulConfig" preserve="all"/> |
| | | <type fullname="GatherSoulPropertyConfig" preserve="all"/> |
| | | <type fullname="GemItemConfig" preserve="all"/> |
| | | <type fullname="GetItemWaysConfig" preserve="all"/> |
| | | <type fullname="GmCmdConfig" preserve="all"/> |
| | | <type fullname="GodWeaponConfig" preserve="all"/> |
| | |
| | |
|
| | | private void ActiveBossShowCam(bool _active)
|
| | | {
|
| | | var prefab = UILoader.LoadPrefab(actorShowModel.cam);
|
| | | var prefab = UILoader.LoadBossShow(actorShowModel.cam);
|
| | | if (_active && (actorShowModel.type == 3 || showTargetList.Count > 0))
|
| | | {
|
| | | bossShowCam = UnityEngine.Object.Instantiate<GameObject>(prefab);
|
| | |
| | | isClientCrossServerOneVsOne = true; |
| | | LoadingWin.isCrossServerOneVsOne = true; |
| | | WindowCenter.Instance.Open<LoadingWin>(); |
| | | MapTransferUtility.Instance.Clear(); |
| | | ClientDungeonStageUtility.SetClientDungeon(true, mapId); |
| | | var sendInfo = new CA231_tagCMClientStartCustomScene(); |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | |
| | | { |
| | | base.OnStageLoadFinish(); |
| | | |
| | | if (PlayerDatas.Instance.hero != null) |
| | | { |
| | | CameraController.Instance.Apply(); |
| | | } |
| | | |
| | | if (opponentPlayer != null) |
| | | { |
| | | opponentPlayer.Destroy(); |
| | |
| | | var playerName = CrossServerLogin.Instance.oneVsOnePlayerData.opponentName; |
| | | var level = CrossServerLogin.Instance.oneVsOnePlayerData.opponentLevel; |
| | | var maxHp = CrossServerLogin.Instance.oneVsOnePlayerData.opponentMaxHp; |
| | | playerInfo = ClientCrossServerOneVsOne.GetRandomOpponentPlayerInfo(1, job, playerName, level, maxHp); |
| | | var scoreClass = CrossServerOneVsOnePlayerInfo.Instance.DanLV; |
| | | playerInfo = ClientCrossServerOneVsOne.GetRandomOpponentPlayerInfo(scoreClass, job, playerName, level, maxHp); |
| | | opponentPlayer = GAMgr.Instance.ReqClntPlayer<GA_PVPClientPlayer>(playerInfo, E_ActorGroup.Enemy); |
| | | |
| | | opponentPlayer.Pos = ClientCrossServerOneVsOne.myPlace == 1 ? rightBornPoint : leftBornPoint; |
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class FairyGrabBossBehaviour : ScrollItem
|
| | | public class FairyGrabBossBehaviour : AutoSelectScrollItem
|
| | | {
|
| | | [SerializeField] AutoSelectCyclicScroll m_Scroll;
|
| | | [SerializeField] SmoothMask m_SmoothMask;
|
| | | [SerializeField] RectTransform m_CenterSign;
|
| | | [SerializeField] RectTransform m_ContainerSelect;
|
| | | [SerializeField] RectTransform m_ContainerKilling;
|
| | | [SerializeField] RectTransform m_ContainerKilled;
|
| | |
| | | [SerializeField] Text m_MapName;
|
| | | [SerializeField] Text m_BossType;
|
| | | [SerializeField] Text m_BossName;
|
| | | [SerializeField] protected Material m_NormalMaterial;
|
| | | [SerializeField] protected Material m_GrayMaterial;
|
| | | [SerializeField] Image m_RealmIcon;
|
| | | [SerializeField] Text m_Progress;
|
| | | [SerializeField] Button m_Select;
|
| | |
| | |
|
| | | private void SelectBoss()
|
| | | {
|
| | | m_Scroll.TrySelectData(bossId);
|
| | | autoSelectScroll.TrySelectData(bossId);
|
| | | }
|
| | |
|
| | | public override void Display(object _data)
|
| | |
| | | }
|
| | | m_ContainerKilled.gameObject.SetActive(killed && opened);
|
| | | m_ContainerKilling.gameObject.SetActive(!killed && opened);
|
| | | m_BossPortrait.material = opened && !killed ? m_SmoothMask.imageMaterials[0] : m_SmoothMask.imageMaterials[1];
|
| | | m_BossPortrait.material = opened && !killed ? m_NormalMaterial : m_GrayMaterial;
|
| | | m_ContainerMapName.gameObject.SetActive(!opened);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | protected virtual void LateUpdate()
|
| | | {
|
| | | if (m_Scroll.autoSelectable && model.selectBoss != bossId && bossId > 0)
|
| | | if (autoSelectScroll.autoSelectable && model.selectBoss != bossId && bossId > 0)
|
| | | {
|
| | | if (Mathf.Abs(m_CenterSign.position.y - rectTransform.position.y) * 100f < rectTransform.rect.height * 0.45f)
|
| | | if (Mathf.Abs(centerSign.position.y - rectTransform.position.y) * 100f < rectTransform.rect.height * 0.45f)
|
| | | {
|
| | | model.selectBoss = bossId;
|
| | | }
|
| | |
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class FindPreciousBossBriefInfoBehaviour : ScrollItem
|
| | | public class FindPreciousBossBriefInfoBehaviour : AutoSelectScrollItem
|
| | | {
|
| | |
|
| | | [SerializeField] protected float m_SelectedShifting = 6f;
|
| | | [SerializeField] protected CanvasGroup m_CanvasGroup;
|
| | | [SerializeField] protected AutoSelectCyclicScroll m_Scroll;
|
| | | [SerializeField] protected Transform m_CenterSign;
|
| | | [SerializeField] protected Button m_Select;
|
| | | [SerializeField] protected RectTransform m_Content;
|
| | | [SerializeField] protected Image m_BackGround;
|
| | |
| | |
|
| | | private void SelectBoss()
|
| | | {
|
| | | m_Scroll.TrySelectData(bossId);
|
| | | autoSelectScroll.TrySelectData(bossId);
|
| | | }
|
| | |
|
| | | protected virtual void OnSubscribe(int _bossId)
|
| | |
| | |
|
| | | protected virtual void LateUpdate()
|
| | | {
|
| | | if (m_Scroll.autoSelectable && selectedBossId != bossId && bossId > 0)
|
| | | if (autoSelectScroll.autoSelectable && selectedBossId != bossId && bossId > 0)
|
| | | {
|
| | | if (Mathf.Abs(m_CenterSign.position.y - rectTransform.position.y) * 100f < rectTransform.rect.height * 0.45f)
|
| | | if (Mathf.Abs(centerSign.position.y - rectTransform.position.y) * 100f < rectTransform.rect.height * 0.45f)
|
| | | {
|
| | | selectedBossId = bossId;
|
| | | }
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | if (CrossServerUtility.IsCrossServer() || ClientCrossServerOneVsOne.isClientCrossServerOneVsOne)
|
| | | {
|
| | | _error = 3;
|
| | | return false;
|
| | |
| | | protected override void OnPreOpen() |
| | | { |
| | | FlagBit = 0; |
| | | // PlayerMountDatas.Event_MountSkillRefresh += MountSkillRefresh; |
| | | // PlayerMountDatas.Event_MountSkillRefresh += MountSkillRefresh; |
| | | _FlipScroll.OnRefreshData += OnRefreshActSkill; |
| | | _FlipScroll.OnTweenCompt += OnTweenCompt; |
| | | _dicHorse = horsemodel._DicHorse; |
| | |
| | | { |
| | | _FlipScroll.OnRefreshData -= OnRefreshActSkill; |
| | | _FlipScroll.OnTweenCompt -= OnTweenCompt; |
| | | // PlayerMountDatas.Event_MountSkillRefresh -= MountSkillRefresh; |
| | | // PlayerMountDatas.Event_MountSkillRefresh -= MountSkillRefresh; |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | |
| | | if (_GetMountSkills.ContainsKey(_MountList[Index]))//解锁 |
| | | { |
| | | _MountSkill.Lock.SetActive(false); |
| | | // _MountSkill.MountNameTxt1.text = HorseConfig.Get(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | // _MountSkill.MountNameTxt1.text = HorseConfig.Get(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | _MountSkill.SkillTex.material = MaterialUtility.GetUIDefaultGraphicMaterial();//亮 |
| | | } |
| | | else//未解锁 |
| | | { |
| | | // _MountSkill.MountNameTxt1.text = HorseConfig.Get(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | // _MountSkill.MountNameTxt1.text = HorseConfig.Get(_MountSkillDic[(_MountList[Index])].HorseID).Name; |
| | | _MountSkill.Lock.SetActive(false); |
| | | } |
| | | |
| | |
| | | else |
| | | HouseID = 0; |
| | | SkillIDNow = _MountList[Index]; |
| | | // _MountSkill.Select.SetActive(true); |
| | | // _MountSkill.Select.SetActive(true); |
| | | if (_GetMountSkills.ContainsKey(_MountList[Index])) |
| | | SkillsToUnlock(_MountList[Index]);//获得解锁技能 |
| | | else |
| | |
| | | } |
| | | else |
| | | { |
| | | // _MountSkill.Select.SetActive(false); |
| | | // _MountSkill.Select.SetActive(false); |
| | | } |
| | | } |
| | | else |
| | |
| | | |
| | | void UnunlockedState(MountSkill _mountSkill, int SkillID)// |
| | | { |
| | | var skillconfig = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1); |
| | | string _skillIcon = skillconfig.IconName; |
| | | var config = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1); |
| | | string _skillIcon = config.IconName; |
| | | _mountSkill.SkillTex.SetSprite(_skillIcon); |
| | | _mountSkill.SkillTex.material = MaterialUtility.GetDefaultSpriteGrayMaterial();//灰 |
| | | _mountSkill.Lock.SetActive(true); |
| | | _mountSkill.SkillNameTxt.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).SkillName; |
| | | // _mountSkill.MountNameTxt1.text = "<color=#ff2828>" + HorseConfig.Get(_MountSkillDic[SkillID].HorseID).Name + "</color>"; |
| | | _mountSkill.SkillNameTxt.text = config.SkillName; |
| | | } |
| | | |
| | | void Consumables(int SkillID) |
| | | { |
| | | |
| | | int ItemID = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).ExAttr4; |
| | | var config = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1); |
| | | int ItemID = config != null ? config.ExAttr4 : 0; |
| | | ItemConfig _Item = ItemConfig.Get(ItemID); |
| | | _ConsumptionGoods.SetSprite(_Item.IconKey); |
| | | _ConsumptionGoodButton.RemoveAllListeners(); |
| | |
| | | { |
| | | ItemAttrData attrData = new ItemAttrData(_Item.ID); |
| | | itemTipsModel.SetItemTipsModel(attrData); |
| | | |
| | | }); |
| | | |
| | | int Number = playerPack.GetItemCountByID(PackType.rptItem, ItemID); |
| | | Quantity = Number;//获取所需消耗品数量 |
| | | if (Number != 0) |
| | | { |
| | | string StrNum = Number.ToString() + "/" + SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).ExAttr5; |
| | | var StrNum = StringUtility.Contact(Number, "/", config != null ? config.ExAttr5 : 0); |
| | | _StageTxt.text = UIHelper.AppendStringColor(0, StrNum); |
| | | } |
| | | else |
| | | { |
| | | string StrNum = " <color=#ff2828>" + Number.ToString() + "</color>" + UIHelper.AppendStringColor(0, "/" + (SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).ExAttr5).ToString()); |
| | | |
| | | string StrNum = " <color=#ff2828>" + Number + "</color>" + UIHelper.AppendStringColor(0, "/" + (config != null ? config.ExAttr5 : 0)); |
| | | _StageTxt.text = StrNum; |
| | | } |
| | | } |
| | | |
| | | void UnlockingPanel(int SkillID)//未解锁面板 |
| | | { |
| | | string _skillIcon = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).IconName; |
| | | _SkillImg.SetSprite(_skillIcon); |
| | | _skillName.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).SkillName; |
| | | _UnlockDescribeBG.SetActive(false); |
| | | _LockedDescribeBG.SetActive(true); |
| | | _Impact1TxtA.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).Description; |
| | | _LevelNumber.text = "0/3"; |
| | | var config = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1); |
| | | if (config != null) |
| | | { |
| | | _SkillImg.SetSprite(config.IconName); |
| | | _skillName.text = config.SkillName; |
| | | _UnlockDescribeBG.SetActive(false); |
| | | _LockedDescribeBG.SetActive(true); |
| | | _Impact1TxtA.text = config.Description; |
| | | _LevelNumber.text = "0/3"; |
| | | } |
| | | } |
| | | |
| | | void SkillsToUnlock(int SkillID)//获得技能解锁技能 |
| | | { |
| | | string _skillIcon = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).IconName; |
| | | _SkillImg.SetSprite(_skillIcon); |
| | | _skillName.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1).SkillName; |
| | | var configLevel1 = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 1); |
| | | if (configLevel1 != null) |
| | | { |
| | | _SkillImg.SetSprite(configLevel1.IconName); |
| | | _skillName.text = configLevel1.SkillName; |
| | | } |
| | | |
| | | _UnlockDescribeBG.SetActive(true); |
| | | _LockedDescribeBG.SetActive(false); |
| | | int SkillLV = _GetMountSkills[SkillID];//获取技能等级 |
| | | |
| | | if (SkillLV >= 3) |
| | | { |
| | | _Impact1Txt.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 3).Description; |
| | | var configLevel3 = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, 3); |
| | | _Impact1Txt.text = configLevel3 != null ? configLevel3.Description : ""; |
| | | _ImpactsTxt.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | _ImpactsTxt.SetActive(true); |
| | | _Impact1Txt.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, SkillLV).Description; |
| | | _Impact2Txt.text = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, SkillLV + 1).Description; |
| | | var configNow = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, SkillLV); |
| | | var configNext = SkillConfig.GetSkillTypeIDAndSkillLV(SkillID, SkillLV + 1); |
| | | _Impact1Txt.text = configNow != null ? configNow.Description : ""; |
| | | _Impact2Txt.text = configNext != null ? configNext.Description : ""; |
| | | } |
| | | _LevelNumber.text = SkillLV.ToString() + "/3"; |
| | | } |
| | |
| | | {
|
| | | List<int> buffIds = new List<int>();
|
| | | StatusMgr.Instance.GetBuffIds(PlayerDatas.Instance.PlayerId, ref buffIds);
|
| | | var skillConfigs = SkillConfig.GetSkillActConfigs(0, 0, DeadModel.deadBuffId);
|
| | | var skillIds = SkillConfig.GetSkills(0, 0, DeadModel.deadBuffId);
|
| | | string skillName = string.Empty;
|
| | | int buffLv = 0;
|
| | | bool isMaxBuff = false;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (skillConfigs != null && skillConfigs.Count > 0)
|
| | | if (skillIds != null && skillIds.Count > 0)
|
| | | {
|
| | | SkillConfig skillConfig = skillConfigs[0];
|
| | | var skillId = skillIds[0];
|
| | | var skillConfig = SkillConfig.Get(skillId);
|
| | | skillName = skillConfig.SkillName;
|
| | | }
|
| | | buffText.text = Language.Get("AncientBattlefield_Text_2", skillName);
|
| | |
| | | [SerializeField] SkillTurnplate m_SkillTurnplate;
|
| | | [SerializeField] Button m_AutoUseXp;
|
| | | [SerializeField] Image m_AutoXpCheck;
|
| | | private List<SkillConfig> skillListAct = new List<SkillConfig>();
|
| | | private List<int> skillListAct = new List<int>();
|
| | | private bool onXpCoolDown = false;
|
| | |
|
| | | private bool m_IsAutoUseXp = false;
|
| | |
| | | if (index < skillListAct.Count)
|
| | | {
|
| | | if(AchievementGoto.achievementType==AchievementGoto.ExcuteSkill
|
| | | && skillListAct[index].SkillID == m_AchieveSkillId)
|
| | | && skillListAct[index] == m_AchieveSkillId)
|
| | | {
|
| | | var _effect = AchievementGuideEffectPool.Require(3);
|
| | | _effect.transform.SetParentEx(skillTran, Vector3.zero, Vector3.zero, Vector3.one);
|
| | |
| | | DebugEx.LogErrorFormat("不存在该职业的技能{0}", _skillJobKey);
|
| | | return;
|
| | | }
|
| | | Dictionary<int, List<SkillConfig>> dic = model.skillActDict[_skillJobKey];
|
| | | Dictionary<int, List<int>> dic = model.skillActDict[_skillJobKey];
|
| | | Dictionary<int, PlayerSkillData> playerskills = PlayerDatas.Instance.skill.GetAllSkill();
|
| | | skillListAct.Clear();
|
| | | foreach (int key in dic.Keys)
|
| | | {
|
| | | List<SkillConfig> typeList = dic[key];
|
| | | SkillConfig lvCfg = typeList[0];
|
| | | foreach (SkillConfig cfg in typeList)
|
| | | List<int> typeList = dic[key];
|
| | | var skillId = typeList[0];
|
| | | foreach (var id in typeList)
|
| | | {
|
| | | if (PlayerDatas.Instance.skill.GetSKillById(cfg.SkillID) != null)
|
| | | if (PlayerDatas.Instance.skill.GetSKillById(id) != null)
|
| | | {
|
| | | lvCfg = cfg;
|
| | | skillId = id;
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (PlayerDatas.Instance.skill.GetFilterPlayerSkill(PlayerDatas.Instance.baseData.Job).Contains(lvCfg.SkillID))
|
| | | if (PlayerDatas.Instance.skill.GetFilterPlayerSkill(PlayerDatas.Instance.baseData.Job).Contains(skillId))
|
| | | {
|
| | | continue;
|
| | | }
|
| | | skillListAct.Add(lvCfg);
|
| | | skillListAct.Add(skillId);
|
| | | }
|
| | | if (skillListAct.Count < 1)
|
| | | {
|
| | | return;
|
| | | }
|
| | | model.presentSltSkillID = skillListAct[0].SkillID;
|
| | | model.presentSltSkillID = skillListAct[0];
|
| | | flipActScroll.pageCnt = Mathf.CeilToInt((float)skillListAct.Count / SkillModel.ACT_SKILL_NUM);
|
| | | UpdateSltSkill();
|
| | | }
|
| | |
| | | m_AchieveSkillId = _skillId;
|
| | | var _index = skillListAct.FindIndex((x) =>
|
| | | {
|
| | | return x.SkillID == _skillId;
|
| | | return x == _skillId;
|
| | | });
|
| | | if (_index != -1)
|
| | | {
|
| | |
| | | m_Time = 0; |
| | | } |
| | | |
| | | public void Refresh(SkillConfig skillCfg) |
| | | public void Refresh(int skillId) |
| | | { |
| | | skill.SetSkillData(skillCfg.SkillID); |
| | | if (model.presentSltSkillID == skillCfg.SkillID) { |
| | | skill.SetSkillData(skillId); |
| | | if (model.presentSltSkillID == skillId) { |
| | | skill.m_SelectImg.gameObject.SetActive(true); |
| | | } |
| | | else { |
| | | skill.m_SelectImg.gameObject.SetActive(false); |
| | | } |
| | | |
| | | skill.SetActive(PlayerDatas.Instance.skill.GetSKillById(skillCfg.SkillID) != null); |
| | | skill.SetActive(PlayerDatas.Instance.skill.GetSKillById(skillId) != null); |
| | | skill.m_SkillBtn.onClick.RemoveAllListeners(); |
| | | skill.m_SkillBtn.onClick.AddListener(OnClickSkill); |
| | | } |
| | |
| | | public int passEquipCnt { get; private set; }
|
| | | public Dictionary<int, int[]> passEquipGetWays = new Dictionary<int, int[]>();
|
| | | public Dictionary<int, string> passEquipGetWayTxts;
|
| | | public Dictionary<int, Dictionary<int, List<SkillConfig>>> skillActDict { get; private set; }
|
| | | public Dictionary<int, Dictionary<int, List<int>>> skillActDict { get; private set; }
|
| | | public List<int> betterPassSkills { get; private set; }
|
| | | public bool jumpToPass { get; set; }
|
| | | public int minTaskHole { get; private set; }
|
| | |
| | | passEquipGetWayTxts = ConfigParse.GetDic<int, string>(funcCfg.Numerical2);
|
| | | }
|
| | | funcCfg = FuncConfigConfig.Get("SkillActTypeIdSort");
|
| | | skillActDict = new Dictionary<int, Dictionary<int, List<SkillConfig>>>();
|
| | | skillActDict = new Dictionary<int, Dictionary<int, List<int>>>();
|
| | | var _JobTypeIds = ConfigParse.GetMultipleStr<int>(funcCfg.Numerical1);
|
| | | var _dict = new Dictionary<int, List<SkillConfig>>();
|
| | | var _dict = new Dictionary<int, List<int>>();
|
| | | for (int i = 0; i < _JobTypeIds.Length; i++)
|
| | | {
|
| | | var _list = SkillConfig.GetSkillActConfigs(2, ACT_SKILL_TYPE, _JobTypeIds[i]);
|
| | | var _list = SkillConfig.GetSkills(2, ACT_SKILL_TYPE, _JobTypeIds[i]);
|
| | | if (_list != null)
|
| | | {
|
| | | _dict.Add(_JobTypeIds[i], _list);
|
| | |
| | | }
|
| | | skillActDict.Add(2, _dict);
|
| | | _JobTypeIds = ConfigParse.GetMultipleStr<int>(funcCfg.Numerical2);
|
| | | _dict = new Dictionary<int, List<SkillConfig>>();
|
| | | _dict = new Dictionary<int, List<int>>();
|
| | | for (int i = 0; i < _JobTypeIds.Length; i++)
|
| | | {
|
| | | var _list = SkillConfig.GetSkillActConfigs(4, ACT_SKILL_TYPE, _JobTypeIds[i]);
|
| | | var _list = SkillConfig.GetSkills(4, ACT_SKILL_TYPE, _JobTypeIds[i]);
|
| | | if (_list != null)
|
| | | {
|
| | | _dict.Add(_JobTypeIds[i], _list);
|
| | |
| | | }
|
| | | skillActDict.Add(4, _dict);
|
| | | _JobTypeIds = ConfigParse.GetMultipleStr<int>(funcCfg.Numerical3);
|
| | | _dict = new Dictionary<int, List<SkillConfig>>();
|
| | | _dict = new Dictionary<int, List<int>>();
|
| | | for (int i = 0; i < _JobTypeIds.Length; i++)
|
| | | {
|
| | | var _list = SkillConfig.GetSkillActConfigs(8, ACT_SKILL_TYPE, _JobTypeIds[i]);
|
| | | var _list = SkillConfig.GetSkills(8, ACT_SKILL_TYPE, _JobTypeIds[i]);
|
| | | if (_list != null)
|
| | | {
|
| | | _dict.Add(_JobTypeIds[i], _list);
|
| | |
| | | [SerializeField] RectTransform m_ContainerGetWay;
|
| | | [SerializeField] ClickScreenOtherSpace clickOtherSpace;
|
| | | [SerializeField, Header("特效时长")] float m_EffectDuration = 1f;
|
| | | private List<SkillConfig> skillListPass = new List<SkillConfig>();
|
| | | private List<int> skillListPass = new List<int>();
|
| | | private int presentSltEquipIndex = -1;
|
| | |
|
| | | Coroutine cacheCoroutine = null;
|
| | |
| | |
|
| | | void GetSkillList()
|
| | | {
|
| | | Dictionary<int, List<SkillConfig>> dic = SkillConfig.GetSkillWithOccpyAndType((int)Mathf.Pow(2, PlayerDatas.Instance.baseData.Job), SkillModel.PASS_SKILL_TYPE);
|
| | | Dictionary<int, List<int>> dic = SkillConfig.GetSkillWithOccpyAndType((int)Mathf.Pow(2, PlayerDatas.Instance.baseData.Job), SkillModel.PASS_SKILL_TYPE);
|
| | | Dictionary<int, PlayerSkillData> playerskills = PlayerDatas.Instance.skill.GetAllSkill();
|
| | | skillListPass.Clear();
|
| | | foreach (int key in dic.Keys)
|
| | | {
|
| | | SkillConfig lvCfg = dic[key][0];
|
| | | foreach (SkillConfig cfg in dic[key])
|
| | | var skillId = dic[key][0];
|
| | | foreach (var id in dic[key])
|
| | | {
|
| | | if (PlayerDatas.Instance.skill.GetSKillById(cfg.SkillID) != null) { lvCfg = cfg; break; }
|
| | | if (PlayerDatas.Instance.skill.GetSKillById(id) != null) { skillId = id; break; }
|
| | | }
|
| | | if (PlayerDatas.Instance.skill.GetFilterPlayerSkill(PlayerDatas.Instance.baseData.Job).Contains(lvCfg.SkillID)) continue;
|
| | | skillListPass.Add(lvCfg);
|
| | | if (PlayerDatas.Instance.skill.GetFilterPlayerSkill(PlayerDatas.Instance.baseData.Job).Contains(skillId)) continue;
|
| | | skillListPass.Add(skillId);
|
| | | }
|
| | | if (skillListPass.Count < 1) return;
|
| | | model.presentSltSkillID = skillListPass[0].SkillID;
|
| | | model.presentSltSkillID = skillListPass[0];
|
| | | flipScroll.pageCnt = Mathf.CeilToInt((float)skillListPass.Count / SkillModel.PASS_SKILL_NUM);
|
| | | flipScroll.RefreshActive();
|
| | | }
|
| | |
| | |
|
| | | foreach (int index in backpack_dic.Keys)
|
| | | {
|
| | | int _id = (int)backpack_dic[index].itemInfo.ItemID;
|
| | | var WingItem = WingRefineExpConfig.Get(_id);
|
| | | if (!ItemConfig.tag_Wings.ContainsKey(_id) || WingItem == null)
|
| | | int itemId = (int)backpack_dic[index].itemInfo.ItemID;
|
| | | if ( !WingRefineExpConfig.Has(itemId)|| !ItemConfig.IsWing(itemId))
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | var wingConfig = ItemConfig.tag_Wings[_id];
|
| | | var wingConfig = ItemConfig.Get(itemId);
|
| | | if (wingConfig.Type == 111 && (wingConfig.JobLimit / 100) == _Job)
|
| | | {
|
| | | WingDic.Add(index, backpack_dic[index]);
|
| | |
| | | _dicWings.Clear();
|
| | | foreach (int index in backpack_dic.Keys)
|
| | | {
|
| | | var WingItem = WingRefineExpConfig.Get((int)backpack_dic[index].itemInfo.ItemID);
|
| | | if (ItemConfig.tag_Wings.ContainsKey((int)backpack_dic[index].itemInfo.ItemID) && WingItem != null)
|
| | | var item = backpack_dic[index];
|
| | | var itemId = item.itemInfo.ItemID;
|
| | | if (WingRefineExpConfig.Has(itemId) && ItemConfig.IsWing(itemId))
|
| | | {
|
| | | WingsInformation _WingsInformation = new WingsInformation();
|
| | | _WingsInformation.WingsID = (int)backpack_dic[index].itemInfo.ItemID;
|
| | | _WingsInformation.WingsCount = (int)backpack_dic[index].itemInfo.ItemCount;
|
| | | var _WingsInformation = new WingsInformation();
|
| | | _WingsInformation.WingsID = itemId;
|
| | | _WingsInformation.WingsCount = item.itemInfo.ItemCount;
|
| | | _dicWings.Add(index, _WingsInformation);
|
| | | }
|
| | | }
|
| | |
|
| | | var config1 = WingRefineExpConfig.Get((int)itemModel.itemInfo.ItemID);
|
| | | foreach (var key in _dicWings.Keys)
|
| | | {
|
| | |
| | | foreach (int index in backpack_dic.Keys)
|
| | | {
|
| | | int _id = (int)backpack_dic[index].itemInfo.ItemID;
|
| | | if (!ItemConfig.tag_Wings.ContainsKey(_id))
|
| | | if (!ItemConfig.IsWing(_id))
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | var wingConfig = ItemConfig.tag_Wings[_id];
|
| | | var wingConfig = ItemConfig.Get(_id);
|
| | | if (wingConfig.Type == 111 && (wingConfig.JobLimit / 100) == PlayerDatas.Instance.baseData.Job)
|
| | | {
|
| | | markingbbol = true;
|
| | | }
|
| | |
|
| | | }
|
| | | if (markingbbol)
|
| | | {
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | Dictionary<int, ItemModel> backpack_Dic = rptItemPack.GetPackModelIndexDict();
|
| | |
|
| | | foreach (int itemIndex in backpack_Dic.Keys)
|
| | | var items = rptItemPack.GetPackModelIndexDict();
|
| | | foreach (var itemIndex in items.Keys)
|
| | | {
|
| | | var WingItem1 = WingRefineExpConfig.Get((int)backpack_Dic[itemIndex].itemInfo.ItemID);
|
| | | if (ItemConfig.tag_Wings.ContainsKey((int)backpack_Dic[itemIndex].itemInfo.ItemID) && WingItem1 != null)
|
| | | var item = items[itemIndex];
|
| | | if (WingRefineExpConfig.Has(item.itemInfo.ItemID))
|
| | | {
|
| | | _wingItemDic.Add(itemIndex, (int)backpack_Dic[itemIndex].itemInfo.ItemID);
|
| | | WingDic.Add(itemIndex, backpack_Dic[itemIndex]);
|
| | | if (ItemConfig.IsWing(item.itemInfo.ItemID))
|
| | | {
|
| | | _wingItemDic.Add(itemIndex, item.itemInfo.ItemID);
|
| | | WingDic.Add(itemIndex, item);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | if (_wingItemDic.Count != 0)
|
| | | {
|
| | | foreach (var key in _wingItemDic.Keys)
|
| | |
| | |
|
| | | private void OnInvitationsChange()
|
| | | {
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | if (CrossServerUtility.IsCrossServer() || ClientCrossServerOneVsOne.isClientCrossServerOneVsOne)
|
| | | {
|
| | | m_Invitations.gameObject.SetActive(false);
|
| | | }
|
| | |
| | |
|
| | | public void RequestAutoMatchTeam(TeamMission _mission)
|
| | | {
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | if (CrossServerUtility.IsCrossServer() || ClientCrossServerOneVsOne.isClientCrossServerOneVsOne)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("CrossMatching3");
|
| | | return;
|
| | |
| | | DemonDungeonLabel treasureLabel;
|
| | | TreasureThreeDimensionsBehaviour m_ThreeDimensionsBehaviour;
|
| | |
|
| | | #region 红点
|
| | | private Transform potentialRed;
|
| | | private Transform achievementRed;
|
| | | private Transform stageUpRed;
|
| | |
|
| | | static GameObjectPoolManager.GameObjectPool m_PotentialRedpool;
|
| | | static GameObjectPoolManager.GameObjectPool m_AchievementRedpool;
|
| | | static GameObjectPoolManager.GameObjectPool m_StageUpRedpool;
|
| | | #endregion
|
| | |
|
| | | SFXController treasureEffect;
|
| | | SFXController backLightEffect;
|
| | | SFXController lockEffect;
|
| | | SFXController challengeSfx;
|
| | | SFXController specialSfx;
|
| | | SFXController highestSfx;
|
| | |
|
| | | public Treasure3DConfig paramConfig { get; set; }
|
| | |
|
| | |
| | | {
|
| | | if (paramConfig != null && !paramConfig.treasureNamePrefab.Equals(string.Empty))
|
| | | {
|
| | | var _instance = UILoader.LoadPrefab(paramConfig.treasureNamePrefab);
|
| | | var _instance = UILoader.LoadTreasure("Misc", paramConfig.treasureNamePrefab);
|
| | | if (_instance != null)
|
| | | {
|
| | | _instance = GameObject.Instantiate(_instance);
|
| | |
| | | GameObjectPoolManager.GameObjectPool _pool = null;
|
| | | if (!m_BottomPoolDict.TryGetValue(category, out _pool))
|
| | | {
|
| | | var _bottomPrefab = UILoader.LoadPrefab(StringUtility.Contact("TreasureBottom_", category));
|
| | | var _bottomPrefab = UILoader.LoadTreasure("Misc", StringUtility.Contact("TreasureBottom_", category));
|
| | | m_CacheBottomScale = _bottomPrefab.transform.localScale;
|
| | | _pool = GameObjectPoolManager.Instance.RequestPool(_bottomPrefab);
|
| | | m_BottomPoolDict.Add(category, _pool);
|
| | |
| | | RecycleTreasureEffect();
|
| | | RequestLockEffect();
|
| | | }
|
| | | if (UI3DTreasureSelectStage.Instance.CloserComplete |
| | | if (UI3DTreasureSelectStage.Instance.CloserComplete
|
| | | && UI3DTreasureSelectStage.Instance.selectTreasure == treasureId)
|
| | | {
|
| | | CloserState();
|
| | |
| | | GameObjectPoolManager.GameObjectPool pool;
|
| | | if (m_ConditionPoolDict.TryGetValue(category, out pool) == false)
|
| | | {
|
| | | var _prefab = UILoader.LoadPrefab(StringUtility.Contact(category, "TreasureCondition"));
|
| | | var _prefab = UILoader.LoadTreasure("Misc", StringUtility.Contact(category, "TreasureCondition"));
|
| | | pool = GameObjectPoolManager.Instance.RequestPool(_prefab);
|
| | | m_ConditionPoolDict.Add(category, pool);
|
| | | }
|
| | |
| | | GameObjectPoolManager.GameObjectPool pool;
|
| | | if (m_LabelPoolDict.TryGetValue(category, out pool) == false)
|
| | | {
|
| | | var _prefab = UILoader.LoadPrefab(StringUtility.Contact(category, "TreasureLabel"));
|
| | | var _prefab = UILoader.LoadTreasure("Misc", StringUtility.Contact(category, "TreasureLabel"));
|
| | | pool = GameObjectPoolManager.Instance.RequestPool(_prefab);
|
| | | m_LabelPoolDict.Add(category, pool);
|
| | | }
|
| | |
| | | }
|
| | | if (m_TreasureCanvaPool == null)
|
| | | {
|
| | | var prefab = UILoader.LoadPrefab("TreasureCanva");
|
| | | var prefab = UILoader.LoadTreasure("Misc", "TreasureCanva");
|
| | | if (prefab)
|
| | | {
|
| | | m_TreasureCanvaPool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | |
| | | {
|
| | | if (m_Instance == null)
|
| | | {
|
| | | var gameObject = Instantiate(UILoader.LoadPrefab("UI3DTreasureSelectStage"));
|
| | | var gameObject = Instantiate(UILoader.LoadTreasure("Misc","UI3DTreasureSelectStage"));
|
| | | m_Instance = gameObject.GetComponent<UI3DTreasureSelectStage>();
|
| | | m_Instance.transform.position = new Vector3(0, 3000, 4000);
|
| | | m_Instance.name = "UI3DTreasureSelectStage";
|
| | |
| | | && !ExistAnyFullScreenOrMaskWinLEqual(WindowType.Base)
|
| | | && !IsOpen("DefaultDialogueBoxWin")
|
| | | && !IsOpen("DialogueDuidanceWin")
|
| | | && !IsOpen("TaskBoxBGMWin");
|
| | | && !IsOpen("TaskBoxBGMWin")
|
| | | && !IsOpen("WelcomeWin");
|
| | |
|
| | | if (exceptOpen != IsOpen("MainInterfaceWin"))
|
| | | {
|
| | |
| | | |
| | | public class AutoSelectCyclicScroll : CyclicScroll |
| | | { |
| | | public bool autoSelectable |
| | | { |
| | | |
| | | [SerializeField] RectTransform m_CenterSign; |
| | | |
| | | public bool autoSelectable { |
| | | get { return Time.time > allowSelectTime; } |
| | | } |
| | | |
| | |
| | | public override void ReArrange() |
| | | { |
| | | base.ReArrange(); |
| | | |
| | | foreach (var item in infiniteItems) |
| | | { |
| | | var autoSelectItem = item as AutoSelectScrollItem; |
| | | if (autoSelectItem != null) |
| | | { |
| | | autoSelectItem.autoSelectScroll = this; |
| | | autoSelectItem.centerSign = m_CenterSign; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using System; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class AutoSelectScrollItem : ScrollItem |
| | | { |
| | | public AutoSelectCyclicScroll autoSelectScroll { get; set; } |
| | | public RectTransform centerSign { get; set; } |
| | | |
| | | } |
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 6ae9f97e721931f4585e010e53f47a5b |
| | | timeCreated: 1497924839 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | public class CyclicScroll : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler
|
| | | {
|
| | | [SerializeField] RectTransform m_Content;
|
| | | public RectTransform content {
|
| | | get { return m_Content; }
|
| | | }
|
| | | public RectTransform content { get { return m_Content; } }
|
| | |
|
| | | [SerializeField] protected BoundOffset m_BoundOffset;
|
| | | [SerializeField] protected Vector2 m_CellSize = new Vector2(100, 100);
|
| | | public Vector2 cellSize {
|
| | | get { return m_CellSize; }
|
| | | }
|
| | | public Vector2 cellSize { get { return m_CellSize; } }
|
| | |
|
| | | [SerializeField] protected Vector2 m_Spacing;
|
| | | public Vector2 spacing {
|
| | | get { return m_Spacing; }
|
| | | }
|
| | | public Vector2 spacing { get { return m_Spacing; } }
|
| | |
|
| | | [SerializeField] Align m_Align = Align.Top;
|
| | | public Align align {
|
| | | get { return m_Align; }
|
| | | }
|
| | | public Align align { get { return m_Align; } }
|
| | |
|
| | | [SerializeField] bool m_ElasticityOn = true;
|
| | | public bool elasticityOn {
|
| | | get { return m_ElasticityOn; }
|
| | | }
|
| | | public bool elasticityOn { get { return m_ElasticityOn; } }
|
| | |
|
| | | [SerializeField] private float m_Elasticity = 0.1f;
|
| | | public float elasticity {
|
| | | get {
|
| | | return m_Elasticity;
|
| | | }
|
| | | }
|
| | | public float elasticity { get { return m_Elasticity; } }
|
| | |
|
| | | [SerializeField] private float m_DecelerationRate = 0.135f;
|
| | | public float decelerationRate {
|
| | | get {
|
| | | return m_DecelerationRate;
|
| | | }
|
| | | }
|
| | | public float decelerationRate { get { return m_DecelerationRate; } }
|
| | |
|
| | | [SerializeField] string m_ChildPrefabName = string.Empty;
|
| | | [SerializeField] string m_ChildDisplayName = string.Empty;
|
| | | [SerializeField] int m_ChildCount = 5;
|
| | |
|
| | | public float normalizedPosition {
|
| | | get {
|
| | |
| | | get; set;
|
| | | }
|
| | |
|
| | | public virtual void Init<T>( List<T> _datas, bool _stepByStep = false)
|
| | | public virtual void Init<T>(List<T> _datas, bool _stepByStep = false)
|
| | | {
|
| | | if (_datas == null)
|
| | | {
|
| | |
| | | {
|
| | | velocity = 0f;
|
| | | autoLerp = false;
|
| | | CreateElements();
|
| | | ElementsMatch();
|
| | | Arrange(align);
|
| | | }
|
| | |
|
| | | private void FillBatchData(int _startIndex)
|
| | | private void CreateElements()
|
| | | {
|
| | | int min = Mathf.Min(infiniteItems.Count, dataCount);
|
| | | preIndex = Mathf.Clamp(_startIndex, 0, dataCount - min);
|
| | | hostIndex = preIndex + min - 1;
|
| | |
|
| | | for (int i = 0; i < infiniteItems.Count; i++)
|
| | | var items = this.content.GetComponentsInChildren<ScrollItem>(true);
|
| | | if (items.Length < m_ChildCount)
|
| | | {
|
| | | var item = infiniteItems[i];
|
| | | if (i <= hostIndex - preIndex)
|
| | | var dif = m_ChildCount - items.Length;
|
| | | if (!string.IsNullOrEmpty(m_ChildPrefabName) && !string.IsNullOrEmpty(m_ChildDisplayName))
|
| | | {
|
| | | item.gameObject.SetActive(true);
|
| | | item.Display(datas[preIndex + i]);
|
| | | }
|
| | | else
|
| | | {
|
| | | item.gameObject.SetActive(false);
|
| | | item.Dispose();
|
| | | for (var i = 0; i < dif; i++)
|
| | | {
|
| | | var instance = UIUtility.CreateWidget(m_ChildPrefabName, m_ChildDisplayName);
|
| | | instance.transform.SetParentEx(this.m_Content, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | content.anchoredPosition = Vector2.zero;
|
| | | }
|
| | |
|
| | | private void FillBatchData(int _startIndex)
|
| | | {
|
| | | int min = Mathf.Min(infiniteItems.Count, dataCount);
|
| | | preIndex = Mathf.Clamp(_startIndex, 0, dataCount - min);
|
| | | hostIndex = preIndex + min - 1;
|
| | |
|
| | | for (int i = 0; i < infiniteItems.Count; i++)
|
| | | {
|
| | | var item = infiniteItems[i];
|
| | | if (i <= hostIndex - preIndex)
|
| | | {
|
| | | item.gameObject.SetActive(true);
|
| | | item.Display(datas[preIndex + i]);
|
| | | }
|
| | | else
|
| | | {
|
| | | item.gameObject.SetActive(false);
|
| | | item.Dispose();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private Vector2 CalculateElementOffset(Align _align)
|
| | | {
|
| | | switch (_align)
|
| | |
| | | using UnityEngine.UI;
|
| | | using System;
|
| | |
|
| | | public class ScrollItem:MonoBehaviour {
|
| | | public class ScrollItem : MonoBehaviour
|
| | | {
|
| | |
|
| | | RectTransform m_RectTransform;
|
| | | public RectTransform rectTransform {
|
| | | get {
|
| | | if(m_RectTransform == null) {
|
| | | if (m_RectTransform == null)
|
| | | {
|
| | | m_RectTransform = this.AddMissingComponent<RectTransform>();
|
| | | }
|
| | | return m_RectTransform;
|
| | | }
|
| | | }
|
| | |
|
| | | public virtual void Display(object _data) {
|
| | | public virtual void Display(object _data)
|
| | | {
|
| | | this.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | | public virtual void Dispose() {
|
| | | public virtual void Dispose()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | |
| | | get {
|
| | | if (m_Instance == null)
|
| | | {
|
| | | var gameObject = Instantiate(UILoader.LoadPrefab("UI3DHeroSkillShow"));
|
| | | var gameObject = Instantiate(UILoader.LoadTreasure("Misc", "UI3DHeroSkillShow"));
|
| | | m_Instance = gameObject.GetComponent<UI3DHeroSkillShow>();
|
| | | Instance.transform.position = new Vector3(0, 4000, 5000);
|
| | | m_Instance.name = "UI3DHeroSkillShow";
|
| | |
| | | if (instance == null)
|
| | | {
|
| | | var config = TreasureConfig.Get(_id);
|
| | | var prefab = UILoader.LoadPrefab(config.Model);
|
| | | var folder = string.Empty;
|
| | | switch ((TreasureCategory)config.Category)
|
| | | {
|
| | | case TreasureCategory.Human:
|
| | | folder = "RenZu";
|
| | | break;
|
| | | case TreasureCategory.Demon:
|
| | | folder = "MoZu";
|
| | | break;
|
| | | case TreasureCategory.Fairy:
|
| | | folder = "XianZu";
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | |
|
| | | var prefab = UILoader.LoadTreasure(folder, config.Model);
|
| | | instance = GameObject.Instantiate(prefab);
|
| | | treasureModels[_id] = instance;
|
| | |
|
| | | UILoader.UnLoadPrefab(config.Model);
|
| | | UILoader.UnLoadTreasure(folder, config.Model);
|
| | | }
|
| | |
|
| | | var animator = instance.GetComponent<Animator>();
|
| | |
| | |
|
| | | public static GameObject LoadUIGodWeapon(int _type)
|
| | | {
|
| | | var prefab = UILoader.LoadPrefab(GeneralDefine.godWeaponMobs[_type]);
|
| | | var prefab = UILoader.LoadGodWeapon(GeneralDefine.godWeaponMobs[_type]);
|
| | | var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | | var model = pool.Request();
|
| | |
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | var prefab = UILoader.LoadPrefab(GeneralDefine.godWeaponMobs[_type]);
|
| | | var prefab = UILoader.LoadGodWeapon(GeneralDefine.godWeaponMobs[_type]);
|
| | | var pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | |
|
| | | var animator = _model.GetComponent<Animator>();
|
| | |
| | | { |
| | | switch (configName) |
| | | { |
| | | case "ItemConfig": |
| | | ItemConfig.GemItemInit(); |
| | | break;
|
| | | case "SkillConfig": |
| | | SkillConfig.SkillClassifingInit();
|
| | | break; |
| | | case "FuncConfigConfig": |
| | | GeneralDefine.Init(); |
| | | break; |