Merge branch 'HazyRegion' of http://192.168.0.87:10010/r/snxxz_scripts into HazyRegion
# Conflicts:
# Utility/RuntimeLogUtility.cs
9 文件已复制
4个文件已删除
1 文件已重命名
12个文件已添加
54个文件已修改
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Thursday, February 14, 2019 |
| | | // [ Date ]: Monday, April 08, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | public readonly int EffectValueB5; |
| | | public readonly int EffectValueC5; |
| | | public readonly int AddSkill1; |
| | | public readonly int AddSkill2; |
| | | public readonly int JobLimit; |
| | | public readonly int RealmLimit; |
| | | public readonly int ItemColor; |
| | |
| | | |
| | | int.TryParse(tables[39],out AddSkill1); |
| | | |
| | | int.TryParse(tables[40],out JobLimit); |
| | | int.TryParse(tables[40],out AddSkill2); |
| | | |
| | | int.TryParse(tables[41],out RealmLimit); |
| | | int.TryParse(tables[41],out JobLimit); |
| | | |
| | | int.TryParse(tables[42],out ItemColor); |
| | | int.TryParse(tables[42],out RealmLimit); |
| | | |
| | | int.TryParse(tables[43],out StarLevel); |
| | | int.TryParse(tables[43],out ItemColor); |
| | | |
| | | int.TryParse(tables[44],out MaxHoleCount); |
| | | int.TryParse(tables[44],out StarLevel); |
| | | |
| | | int.TryParse(tables[45],out CanBreak); |
| | | int.TryParse(tables[45],out MaxHoleCount); |
| | | |
| | | int.TryParse(tables[46],out MaxEndure); |
| | | int.TryParse(tables[46],out CanBreak); |
| | | |
| | | int.TryParse(tables[47],out EndureReduceType); |
| | | int.TryParse(tables[47],out MaxEndure); |
| | | |
| | | int.TryParse(tables[48],out BindType); |
| | | int.TryParse(tables[48],out EndureReduceType); |
| | | |
| | | int.TryParse(tables[49],out MaxSkillCnt); |
| | | int.TryParse(tables[49],out BindType); |
| | | |
| | | int.TryParse(tables[50],out ExpireTime); |
| | | int.TryParse(tables[50],out MaxSkillCnt); |
| | | |
| | | int.TryParse(tables[51],out MaxFitLV); |
| | | int.TryParse(tables[51],out ExpireTime); |
| | | |
| | | int.TryParse(tables[52],out SuiteiD); |
| | | int.TryParse(tables[52],out MaxFitLV); |
| | | |
| | | DropinstantEffName = tables[53]; |
| | | int.TryParse(tables[53],out SuiteiD); |
| | | |
| | | IconKey = tables[54]; |
| | | DropinstantEffName = tables[54]; |
| | | |
| | | int.TryParse(tables[55],out ChangeOrd); |
| | | IconKey = tables[55]; |
| | | |
| | | Description = tables[56]; |
| | | int.TryParse(tables[56],out ChangeOrd); |
| | | |
| | | QualityName = tables[57]; |
| | | Description = tables[57]; |
| | | |
| | | int.TryParse(tables[58],out QualityEchoType); |
| | | QualityName = tables[58]; |
| | | |
| | | int.TryParse(tables[59],out LimitSTR); |
| | | int.TryParse(tables[59],out QualityEchoType); |
| | | |
| | | int.TryParse(tables[60],out LimitPHY); |
| | | int.TryParse(tables[60],out LimitSTR); |
| | | |
| | | int.TryParse(tables[61],out LimitPNE); |
| | | int.TryParse(tables[61],out LimitPHY); |
| | | |
| | | Template = tables[62]; |
| | | int.TryParse(tables[62],out LimitPNE); |
| | | |
| | | int.TryParse(tables[63],out DropItemPattern); |
| | | Template = tables[63]; |
| | | |
| | | int.TryParse(tables[64],out SellTip); |
| | | int.TryParse(tables[64],out DropItemPattern); |
| | | |
| | | int.TryParse(tables[65],out BatchUse); |
| | | int.TryParse(tables[65],out SellTip); |
| | | |
| | | int.TryParse(tables[66],out Jump); |
| | | int.TryParse(tables[66],out BatchUse); |
| | | |
| | | string[] GetWayStringArray = tables[67].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | int.TryParse(tables[67],out Jump); |
| | | |
| | | string[] GetWayStringArray = tables[68].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | GetWay = new int[GetWayStringArray.Length]; |
| | | for (int i=0;i<GetWayStringArray.Length;i++) |
| | | { |
| | | int.TryParse(GetWayStringArray[i],out GetWay[i]); |
| | | } |
| | | |
| | | ItemTypeName = tables[68]; |
| | | ItemTypeName = tables[69]; |
| | | |
| | | string[] UseCondiTypeStringArray = tables[69].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] UseCondiTypeStringArray = tables[70].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | UseCondiType = new int[UseCondiTypeStringArray.Length]; |
| | | for (int i=0;i<UseCondiTypeStringArray.Length;i++) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d8119bf7e6ca50545b91b2230738cd2c |
| | | timeCreated: 1550120902 |
| | | timeCreated: 1554702690 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | private static Dictionary<int, ItemPlusConfig> ItemPlus = new Dictionary<int, ItemPlusConfig>();
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | | var key = type * 100 + level;
|
| | | var key = type * 10000 + level;
|
| | | ItemPlus[key] = this;
|
| | | }
|
| | |
|
| | | public static ItemPlusConfig GetTypeAndLevel(int type, int level)
|
| | | {
|
| | | var key = type * 100 + level;
|
| | | var key = type * 10000 + level;
|
| | | ItemPlusConfig itemPlus = null;
|
| | | ItemPlus.TryGetValue(key, out itemPlus);
|
| | | return itemPlus;
|
| | |
| | | |
| | | public override void SaveJson(StringBuilder stringBuilder) |
| | | { |
| | | // bw.Write((byte)type); |
| | | // bw.Write(id); |
| | | // bw.Write((float)System.Math.Round(transform.position.x, 2)); |
| | | // bw.Write((float)System.Math.Round(transform.position.y, 2)); |
| | | // bw.Write((float)System.Math.Round(transform.position.z, 2)); |
| | | stringBuilder.Append("{"); |
| | | stringBuilder.Append("\"type\":").Append((byte)type).Append(","); |
| | | stringBuilder.Append("\"id\":").Append((byte)type).Append(","); |
| | |
| | | |
| | | public override void LoadJson(JsonData json) |
| | | { |
| | | } |
| | | |
| | | public override void Export(BinaryWriter bw) |
| | | { |
| | | base.Export(bw); |
| | | bw.Write((byte)overCondition); |
| | | bw.Write((byte)refreshType); |
| | | bw.Write(conditionParam); |
| | | bw.Write(overParam); |
| | | bw.Write(nextEventID); |
| | | bw.Write(monsterList.Count); |
| | | foreach (var _monster in monsterList) |
| | | type = (Evt.E_EventType)(byte)json["type"]; |
| | | id = (int)json["id"]; |
| | | float _pX = (float)json["px"]; |
| | | float _pY = (float)json["py"]; |
| | | float _pZ = (float)json["pz"]; |
| | | transform.position = new Vector3(_pX, _pY, _pZ); |
| | | overCondition = (Evt_RefreshMonster.E_OverCondition)(byte)json["overCondition"]; |
| | | refreshType = (Evt_RefreshMonster.E_RefreshType)(byte)json["refreshType"]; |
| | | conditionParam = (int)json["conditionParam"]; |
| | | overParam = (int)json["overParam"]; |
| | | nextEventID = (int)json["nextEventID"]; |
| | | var _monsterList = json["monsterList"]; |
| | | for (int i = 0; i < _monsterList.Count; ++i) |
| | | { |
| | | _monster.Export(bw); |
| | | var _resName = _monsterList[i]["resName"].ToString(); |
| | | GameObject _go = null; |
| | | |
| | | if (!string.IsNullOrEmpty(_resName.Trim())) |
| | | { |
| | | string _path = "Assets/ResourcesOut/Mob/Prefab_Race_" + _resName + ".prefab"; |
| | | _go = AssetDatabase.LoadAssetAtPath<GameObject>(_path); |
| | | if (_go) |
| | | { |
| | | _go = Instantiate(_go); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | _go = GameObject.CreatePrimitive(PrimitiveType.Capsule); |
| | | } |
| | | |
| | | _go.transform.SetParent(transform); |
| | | _go.transform.localPosition = Vector3.zero; |
| | | _go.transform.eulerAngles = Vector3.zero; |
| | | _go.transform.localScale = Vector3.one; |
| | | |
| | | var _monsterData = _go.AddComponent<Bhv_MonsterData>(); |
| | | _monsterData.resName = _resName; |
| | | monsterList.Add(_monsterData); |
| | | |
| | | _monsterData.LoadJson(_monsterList[i]); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public override void Export(BinaryWriter bw) |
| | | { |
| | | base.Export(bw); |
| | | bw.Write((byte)overCondition); |
| | | bw.Write((byte)refreshType); |
| | | bw.Write(conditionParam); |
| | | bw.Write(overParam); |
| | | bw.Write(nextEventID); |
| | | bw.Write(monsterList.Count); |
| | | foreach (var _monster in monsterList) |
| | | { |
| | | _monster.Export(bw); |
| | | } |
| | | } |
| | | |
| | | public override bool DrawUI(GUISkin guiSkin) |
| | | { |
| | | bool _result = false; |
| | |
| | | triggerList[i].SaveJson(_stringBuilder); |
| | | } |
| | | } |
| | | _stringBuilder.Append("]"); |
| | | _stringBuilder.Append("},"); |
| | | _stringBuilder.Append("],"); |
| | | _stringBuilder.Append("\"eventList\": ["); |
| | | if (eventList.Count > 0) |
| | | { |
| | |
| | | { |
| | | _stringBuilder.Append(","); |
| | | eventList[i].SaveJson(_stringBuilder); |
| | | } |
| | | } |
| | | _stringBuilder.Append("],"); |
| | | _stringBuilder.Append("\"transferList\": ["); |
| | | if (transferList.Count > 0) |
| | | { |
| | | transferList[0].SaveJson(_stringBuilder); |
| | | for (int i = 1; i < transferList.Count; ++i) |
| | | { |
| | | _stringBuilder.Append(","); |
| | | transferList[i].SaveJson(_stringBuilder); |
| | | } |
| | | } |
| | | _stringBuilder.Append("]"); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public void LoadJson(LitJson.JsonData json) |
| | | { |
| | | id = (int)json["id"]; |
| | | var _triggerList = json["triggerList"]; |
| | | GameObject _go = null; |
| | | if (_triggerList.Count > 0) |
| | | { |
| | | for (int i = 0; i < _triggerList.Count; ++i) |
| | | { |
| | | _go = new GameObject(NodeName_Trigger + i); |
| | | _go.transform.position = Vector3.zero; |
| | | _go.transform.eulerAngles = Vector3.zero; |
| | | _go.transform.localScale = Vector3.one; |
| | | var _triggerBhv = _go.AddComponent<Bhv_MapTrigger>(); |
| | | _triggerBhv.boxCollider = _go.AddComponent<BoxCollider>(); |
| | | _triggerBhv.transform.SetParent(transform.Find(NodeName_TriggerList)); |
| | | triggerList.Add(_triggerBhv); |
| | | _triggerBhv.LoadJson(_triggerList[i]); |
| | | } |
| | | } |
| | | var _eventList = json["eventList"]; |
| | | if (_eventList.Count > 0) |
| | | { |
| | | for (int i = 0; i < _eventList.Count; ++i) |
| | | { |
| | | _go = new GameObject(NodeName_Event + i); |
| | | _go.transform.position = Vector3.zero; |
| | | _go.transform.eulerAngles = Vector3.zero; |
| | | _go.transform.localScale = Vector3.one; |
| | | var _type = (Evt.E_EventType)(byte)_eventList[i]["type"];//br.ReadByte(); |
| | | if (_type == Evt.E_EventType.Enemy) |
| | | { |
| | | var _eventBhv = _go.AddComponent<Bhv_Evt_RefreshMonster>(); |
| | | _eventBhv.type = _type; |
| | | _eventBhv.transform.SetParent(transform.Find(NodeName_EventList)); |
| | | eventList.Add(_eventBhv); |
| | | _eventBhv.LoadJson(_eventList[i]); |
| | | } |
| | | else if (_type == Evt.E_EventType.SceneObject) |
| | | { |
| | | var _eventBhv = _go.AddComponent<Bhv_Evt_RefreshSceneObject>(); |
| | | _eventBhv.type = _type; |
| | | _eventBhv.transform.SetParent(transform.Find(NodeName_EventList)); |
| | | eventList.Add(_eventBhv); |
| | | _eventBhv.LoadJson(_eventList[i]); |
| | | } |
| | | } |
| | | } |
| | | var _transferList = json["transferList"]; |
| | | for (int i = 0; i < _transferList.Count; ++i) |
| | | { |
| | | _go = new GameObject(NodeName_Transfer + i); |
| | | _go.transform.position = Vector3.zero; |
| | | _go.transform.eulerAngles = Vector3.zero; |
| | | _go.transform.localScale = Vector3.one; |
| | | var _transferBhv = _go.AddComponent<Bhv_Trasfer>(); |
| | | _transferBhv.transform.SetParent(transform.Find(NodeName_TransferList)); |
| | | transferList.Add(_transferBhv); |
| | | _transferBhv.LoadJson(_transferList[i]); |
| | | } |
| | | } |
| | | |
| | | public void Load(BinaryReader br) |
| | | { |
| | | id = br.ReadInt32(); |
| | |
| | | bw.Write((float)System.Math.Round(capsuleCollider.radius, 2)); |
| | | } |
| | | |
| | | public void SaveJson(System.Text.StringBuilder stringBuilder) |
| | | { |
| | | stringBuilder.Append("{"); |
| | | stringBuilder.Append("\"effectID\":").Append(effectID).Append(","); |
| | | stringBuilder.Append("\"stateNameFront\":\"").Append(stateNameFront).Append("\","); |
| | | stringBuilder.Append("\"flyTimeFront\":").Append(flyTimeFront).Append(","); |
| | | stringBuilder.Append("\"stateNameBack\":\"").Append(stateNameBack).Append("\","); |
| | | stringBuilder.Append("\"flyTimeBack\":").Append(flyTimeBack).Append(","); |
| | | stringBuilder.Append("\"px\":").Append((float)System.Math.Round(transform.position.x, 2)).Append(","); |
| | | stringBuilder.Append("\"py\":").Append((float)System.Math.Round(transform.position.y, 2)).Append(","); |
| | | stringBuilder.Append("\"pz\":").Append((float)System.Math.Round(transform.position.z, 2)).Append(","); |
| | | stringBuilder.Append("\"r\":").Append((float)System.Math.Round(capsuleCollider.radius, 2)); |
| | | stringBuilder.Append("}"); |
| | | } |
| | | |
| | | public void LoadJson(LitJson.JsonData json) |
| | | { |
| | | effectID = (int)json["effectID"]; |
| | | stateNameFront = json["stateNameFront"].ToString(); |
| | | flyTimeFront = (int)json["flyTimeFront"]; |
| | | stateNameBack = json["stateNameBack"].ToString(); |
| | | flyTimeBack = (int)json["flyTimeBack"]; |
| | | float _pX = (float)json["px"]; |
| | | float _pY = (float)json["py"]; |
| | | float _pZ = (float)json["pz"]; |
| | | transform.position = new Vector3(_pX, _pY, _pZ); |
| | | float _r = (float)json["r"]; |
| | | capsuleCollider.radius = _r; |
| | | if (EffectConfig.Has(effectID)) |
| | | { |
| | | var _prefab = InstanceResourcesLoader.LoadEffect(effectID); |
| | | Effect = Instantiate(_prefab); |
| | | Effect.transform.SetParent(transform); |
| | | Effect.transform.localPosition = Vector3.zero; |
| | | Effect.transform.localScale = Vector3.one; |
| | | Effect.transform.rotation = Quaternion.identity; |
| | | } |
| | | } |
| | | |
| | | public void Load(BinaryReader br) |
| | | { |
| | | effectID = br.ReadInt32(); |
| | |
| | | } |
| | | } |
| | | |
| | | public void SaveJson(System.Text.StringBuilder stringBuilder) |
| | | { |
| | | stringBuilder.Append("{"); |
| | | stringBuilder.Append("\"transferType\":").Append((byte)transferType).Append(","); |
| | | stringBuilder.Append("\"param\":").Append(param).Append(","); |
| | | stringBuilder.Append("\"pointList\":["); |
| | | if (pointList.Count > 0) |
| | | { |
| | | pointList[0].SaveJson(stringBuilder); |
| | | for (int i = 1; i < pointList.Count; ++i) |
| | | { |
| | | stringBuilder.Append(","); |
| | | pointList[i].SaveJson(stringBuilder); |
| | | } |
| | | } |
| | | stringBuilder.Append("]"); |
| | | stringBuilder.Append("}"); |
| | | } |
| | | |
| | | public void LoadJson(LitJson.JsonData json) |
| | | { |
| | | transferType = (MapTrasfer.E_TransferType)(byte)json["transferType"]; |
| | | param = (int)json["param"]; |
| | | var _pointList = json["pointList"]; |
| | | for (int i = 0; i < _pointList.Count; ++i) |
| | | { |
| | | var _go = new GameObject(pointList.Count + "_TransferPoint"); |
| | | _go.transform.SetParent(transform); |
| | | _go.transform.localPosition = Vector3.zero; |
| | | _go.transform.eulerAngles = Vector3.zero; |
| | | _go.transform.localScale = Vector3.one; |
| | | var _transferPoint = _go.AddComponent<Bhv_TransferPoint>(); |
| | | _transferPoint.capsuleCollider = _go.AddComponent<CapsuleCollider>(); |
| | | pointList.Add(_transferPoint); |
| | | |
| | | _transferPoint.LoadJson(_pointList[i]); |
| | | } |
| | | } |
| | | |
| | | public void Export(BinaryWriter bw) |
| | | { |
| | | bw.Write((byte)transferType); |
| | |
| | | private void SaveJson() |
| | | { |
| | | var _mapData = target as Bhv_MapData; |
| | | // string _defaultPath = EditorPrefs.GetString(LS_KEY_SAVEPATH, System.Environment.CurrentDirectory); |
| | | // string _path = EditorUtility.SaveFilePanel("保存数据", _defaultPath, "map_" + _mapData.id, "ed"); |
| | | // if (string.IsNullOrEmpty(_path)) |
| | | // { |
| | | // return; |
| | | // } |
| | | |
| | | // LitJson.JsonMapper.RegisterExporter<System.Type>((v, w) => |
| | | // { |
| | | // w.Write(v.FullName); |
| | | // }); |
| | | |
| | | // LitJson.JsonMapper.RegisterImporter<string, System.Type>((s) => |
| | | // { |
| | | // return System.Type.GetType(s); |
| | | // }); |
| | | |
| | | // System.Action<Vector3, LitJson.JsonWriter> writeVector3 = (v, w) => |
| | | // { |
| | | // w.WriteObjectStart(); |
| | | // w.WritePropertyName("x"); |
| | | // w.Write((float)v.x); |
| | | // w.WritePropertyName("y"); |
| | | // w.Write((float)v.y); |
| | | // w.WritePropertyName("z"); |
| | | // w.Write((float)v.z); |
| | | // w.WriteObjectEnd(); |
| | | // }; |
| | | |
| | | // LitJson.JsonMapper.RegisterExporter<Vector3>((v, w) => |
| | | // { |
| | | // writeVector3(v, w); |
| | | // }); |
| | | // LitJson.UnityTypeBindings.Register(); |
| | | |
| | | // var _json = LitJson.JsonMapper.ToJson(_mapData); |
| | | Debug.Log(_mapData.SaveJson()); |
| | | string _defaultPath = EditorPrefs.GetString(LS_KEY_SAVEPATH, System.Environment.CurrentDirectory); |
| | | string _path = EditorUtility.SaveFilePanel("保存数据", _defaultPath, "map_" + _mapData.id, "json"); |
| | | if (string.IsNullOrEmpty(_path)) |
| | | { |
| | | return; |
| | | } |
| | | File.WriteAllText(_path, _mapData.SaveJson()); |
| | | } |
| | | |
| | | private class _JsonWritter : LitJson.JsonWriter |
| | | private void LoadJson() |
| | | { |
| | | var _mapData = target as Bhv_MapData; |
| | | |
| | | } |
| | | |
| | |
| | |
|
| | | ModelCenter.Instance.GetModel<MapModel>().UpdateDungeonMapLines(package);
|
| | | ModelCenter.Instance.GetModel<JadeDynastyBossModel>().OnReceivePackage(package);
|
| | | ModelCenter.Instance.GetModel<RidingPetBossModel>().ReceivePackage(package);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, March 22, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Snxxz.UI; |
| | | |
| | | public class DTCAC07_tagGCHorsePetBossInfo : DtcBasic { |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HAC07_tagGCHorsePetBossInfo;
|
| | |
|
| | | ModelCenter.Instance.GetModel<RidingPetBossModel>().ReceivePackage(package);
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
copy from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta
copy to Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC07_tagGCHorsePetBossInfo.cs.meta
| File was copied from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: daf42844aeeb3ce48a661b3e1cdf146b |
| | | timeCreated: 1541424855 |
| | | licenseType: Free |
| | | guid: 9e60f623bd383f54fae32a9701f02b1f |
| | | timeCreated: 1553243342 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // AC 07 骑宠Boss信息 #tagGCHorsePetBossInfo
|
| | |
|
| | | public class HAC07_tagGCHorsePetBossInfo : GameNetPackBasic {
|
| | | public uint IsEnd; // 是否已结束(按位代表对应线路是否结束)
|
| | |
|
| | | public HAC07_tagGCHorsePetBossInfo () {
|
| | | _cmd = (ushort)0xAC07;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out IsEnd, vBytes, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | }
|
copy from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta
copy to Core/NetworkPackage/ServerPack/HAC_Activity/HAC07_tagGCHorsePetBossInfo.cs.meta
| File was copied from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: daf42844aeeb3ce48a661b3e1cdf146b |
| | | timeCreated: 1541424855 |
| | | licenseType: Free |
| | | guid: 60ff2ad7692bc504db195e2d653b01ef |
| | | timeCreated: 1553243255 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | | case AllianceBossModel.DATAMAPID:
|
| | | WindowCenter.Instance.Open<AllianceBossHintWin>();
|
| | | break;
|
| | | case RidingPetBossModel.RIDINGPETBOSS_MAP:
|
| | | WindowCenter.Instance.Open<RidingPetBossHintWin>();
|
| | | break;
|
| | | default:
|
| | | WindowCenter.Instance.Open<DungeonStageTimeWin>();
|
| | | break;
|
| | |
| | | |
| | | |
| | | Snxxz.UI.ItemOperateUtility gen_to_be_invoked = (Snxxz.UI.ItemOperateUtility)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | ItemOperateType _btnType;translator.Get(L, 2, out _btnType); |
| | | string _guid = LuaAPI.lua_tostring(L, 3); |
| | | |
| | | gen_to_be_invoked.TakeOutFromWarehouse( _btnType, _guid ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.ShowUICtrl( ); |
| | | gen_to_be_invoked.ShowTip( ); |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | Snxxz.UI.ItemAttrData _attrData = (Snxxz.UI.ItemAttrData)translator.GetObject(L, 2, typeof(Snxxz.UI.ItemAttrData)); |
| | | |
| | | gen_to_be_invoked.SetDepotTipsBtn( _attrData ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.ItemTipsModel gen_to_be_invoked = (Snxxz.UI.ItemTipsModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | Snxxz.UI.ItemAttrData _attrData = (Snxxz.UI.ItemAttrData)translator.GetObject(L, 2, typeof(Snxxz.UI.ItemAttrData)); |
| | | |
| | | gen_to_be_invoked.SetDepotBagTipsBtn( _attrData ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | |
| | | using Snxxz.UI;
|
| | | using System.Text.RegularExpressions;
|
| | |
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class InGameDownLoad : SingletonMonobehaviour<InGameDownLoad>
|
| | | |
| | | {
|
| | | public const int BYTE_PER_KILOBYTE = 1024;
|
| | | public const int BYTE_PER_MILLIONBYTE = 1048576;
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | int maxWorkingTask = 2;
|
| | |
|
| | | TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
|
| | |
|
| | |
| | |
|
| | | while (okCount < totalCount)
|
| | | {
|
| | | while (workingQueue.Count < 2 && downLoadTasksQueues.Count > 0)
|
| | | while (workingQueue.Count < maxWorkingTask && downLoadTasksQueues.Count > 0)
|
| | | {
|
| | | var assetVersion = downLoadTasksQueues.Dequeue();
|
| | | var remoteURL = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), "/", assetVersion.relativePath);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private int GetMaxTask()
|
| | | {
|
| | | switch (Application.platform)
|
| | | {
|
| | | case RuntimePlatform.Android:
|
| | | if (DeviceUtility.cpu >= 4 && DeviceUtility.memory > 3.2f * 1024)
|
| | | {
|
| | | return 2;
|
| | | }
|
| | | else
|
| | | {
|
| | | return 1;
|
| | | }
|
| | | case RuntimePlatform.IPhonePlayer:
|
| | | if (DeviceUtility.cpu > 1 && DeviceUtility.memory > 1.5f * 1024)
|
| | | {
|
| | | return 2;
|
| | | }
|
| | | else
|
| | | {
|
| | | return 1;
|
| | | }
|
| | | case RuntimePlatform.WindowsEditor:
|
| | | return 2;
|
| | | default:
|
| | | return 1;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | maxWorkingTask = GetMaxTask();
|
| | | }
|
| | |
|
| | | public struct Reward
|
| | | {
|
| | | public int id;
|
| | |
| | | { |
| | | this.gameObject.SetActive(true); |
| | | m_Auction.Init(item); |
| | | m_Auction.button.SetListener(() =>
|
| | | {
|
| | | var itemData = new ItemAttrData(item.itemId, false, (ulong)item.count, item.itemInfo.index,
|
| | | false, item.packType, item.guid, item.useDataDict);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemData);
|
| | | }); |
| | | m_AuctionName.text = item.config.ItemName; |
| | | m_AuctionName.color = UIHelper.GetUIColor(item.config.ItemColor, true); |
| | | } |
| | |
| | |
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | itemTipsModel.ShowTip();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | case DailyQuestType.AllianceBoss2:
|
| | | GotoAllianceBoss(_id, 1);
|
| | | break;
|
| | | case DailyQuestType.HazyRegion:
|
| | | WindowCenter.Instance.Close<DailyQuestWin>();
|
| | | WindowCenter.Instance.Open<CrossServerWin>(false, 2);
|
| | | break;
|
| | | //case DailyQuestType.JadeDynastyBoss:
|
| | | // WindowCenter.Instance.Close<DailyQuestWin>();
|
| | | // WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 3);
|
| | |
| | | private int NeedCostCopper = 0;//所需的铜钱 |
| | | private bool _isBool = false;//仙玉找回/铜钱找回 |
| | | private int number = 0;//找回的次数 |
| | | |
| | | protected override void BindController() |
| | | { |
| | | } |
| | |
| | | { |
| | | } |
| | | #endregion |
| | | GetItemPathModel _GetItemPath; |
| | | GetItemPathModel GetItemPath { |
| | | get { return _GetItemPath ?? (_GetItemPath = ModelCenter.Instance.GetModel<GetItemPathModel>()); } |
| | | } |
| | | ResourcesBackModel m_ResourcesBackModel; |
| | | ResourcesBackModel resourcesBackModel { get { return m_ResourcesBackModel ?? (m_ResourcesBackModel = ModelCenter.Instance.GetModel<ResourcesBackModel>()); } } |
| | | |
| | | ResourcesBackModel resourcesBackModel { get { return ModelCenter.Instance.GetModel<ResourcesBackModel>(); } } |
| | | void OnClickCloseButon() |
| | | { |
| | | Close(); |
| | |
| | | |
| | | void RegardsFairyJadeBack() |
| | | { |
| | | int getJade = (int)UIHelper.GetMoneyCnt(1);//拥有的仙玉 |
| | | int CostJade = NeedCostJade; |
| | | string strLanguage = string.Format(Language.Get("FairyLand_Func13"), NeedCostJade, CostJade); |
| | | var own = (int)UIHelper.GetMoneyCnt(1);//拥有的仙玉 |
| | | var need = NeedCostJade; |
| | | var strLanguage = Language.Get("FairyLand_Func13", NeedCostJade, need); |
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strLanguage, (bool isOk) => |
| | | { |
| | | if (isOk) |
| | | { |
| | | if (getJade >= CostJade) |
| | | if (own >= need) |
| | | { |
| | | CMRecoverGain(0, resourcesBackModel.ResourcesBackId, number); |
| | | Close(); |
| | |
| | | } |
| | | } |
| | | });
|
| | |
|
| | |
|
| | | } |
| | | |
| | | void OnClickReduceButton() |
| | |
| | | |
| | | void FindNumberSlider(float _float = 0f) |
| | | { |
| | | |
| | | _isBool = ResourcesBackBoxBack.isBool; |
| | | int resourcesBackID = resourcesBackModel.ResourcesBackId; |
| | | var resourcesBackID = resourcesBackModel.ResourcesBackId; |
| | | if (_isBool) |
| | | { |
| | | FairyJadeFind(resourcesBackID);//仙玉 |
| | |
| | | |
| | | private void FairyJadeFind(int ResourcesBackID) |
| | | { |
| | | ResourcesBackClass resourcesBackClass = resourcesBackModel.ResourcesBackDic[ResourcesBackID]; |
| | | var resourcesBackClass = resourcesBackModel.ResourcesBackDic[ResourcesBackID]; |
| | | m_Slider.interactable = true; |
| | | m_Slider.wholeNumbers = true; |
| | | int minNumber = 1; |
| | |
| | | { |
| | | m_ResourceName.text = resourcesBackClass.NameOfActivity + string.Format(Language.Get("ResourceBack_NormalTimes"), resourcesBackClass.RecoverCnt); |
| | | }
|
| | |
|
| | |
|
| | | m_Slider.minValue = minNumber; |
| | | m_Slider.maxValue = maxNumber; |
| | |
| | | } |
| | | needCostCopper = (Mathf.CeilToInt(m_Slider.value)) * resourcesBackClass.CostCopper;
|
| | | m_RequiredPrice.gameObject.SetActive(false);
|
| | | // m_RequiredPrice.text = string.Format(Language.Get("ResourceBack_CopperCost"), needCostCopper);
|
| | | NeedCostCopper = needCostCopper; |
| | | } |
| | | |
| | | private void CMRecoverGain(int type, int inedex, int _number) |
| | | { |
| | | CA553_tagCMRecoverGain CA553 = new CA553_tagCMRecoverGain(); |
| | | var CA553 = new CA553_tagCMRecoverGain(); |
| | | CA553.Type = (byte)type; |
| | | byte[] indexList = new byte[] { (byte)inedex }; |
| | | CA553.Cnt = (byte)indexList.Length; |
| | |
| | | byte[] recoverCntList = new byte[] { (byte)number }; |
| | | CA553.RecoverCntList = recoverCntList; |
| | | GameNetSystem.Instance.SendInfo(CA553); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | {
|
| | | tipsModel.SetItemTipsModel(model.packType,model.guid,false,false);
|
| | | tipsModel.SetDogzEquipBtn(tipsModel.curAttrData);
|
| | | tipsModel.ShowUICtrl();
|
| | | tipsModel.ShowTip();
|
| | | });
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | tipsModel.SetItemTipsModel(model.packType, model.guid, false, true);
|
| | | tipsModel.SetDogzItemBtn(tipsModel.curAttrData);
|
| | | tipsModel.ShowUICtrl();
|
| | | tipsModel.ShowTip();
|
| | | });
|
| | | }
|
| | | }
|
| | |
| | | WindowCenter.Instance.Open<AllianceBossHintWin>();
|
| | | }
|
| | | break;
|
| | | case RidingPetBossModel.RIDINGPETBOSS_MAP:
|
| | | if (!WindowCenter.Instance.IsOpen<RidingPetBossHintWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<RidingPetBossHintWin>();
|
| | | }
|
| | | break;
|
| | | case TreasureModel.TREASURE_MAPID:
|
| | | break;
|
| | | case HeavenBattleModel.HEAVEBATTLE_MAPID:
|
| | |
| | | case AllianceBossModel.DATAMAPID:
|
| | | WindowCenter.Instance.Open<AllianceBossVictoryWin>();
|
| | | break;
|
| | | case RidingPetBossModel.RIDINGPETBOSS_MAP:
|
| | | WindowCenter.Instance.Open<RidingPetBossVictoryWin>();
|
| | | break;
|
| | | default:
|
| | | WindowCenter.Instance.Open<DungeonVictoryWin>();
|
| | | break;
|
| | |
| | | if (dataMapId == DemonJarModel.DEMONJAR_MAPID
|
| | | || dataMapId == JadeDynastyBossModel.JADEDYNASTY_MAP
|
| | | || dataMapId == JadeDynastyTowerModel.DATA_MAPID
|
| | | || dataMapId == AllianceBossModel.DATAMAPID)
|
| | | || dataMapId == AllianceBossModel.DATAMAPID
|
| | | || dataMapId == RidingPetBossModel.RIDINGPETBOSS_MAP)
|
| | | {
|
| | | if (_show)
|
| | | {
|
| | |
| | | if (dataMapId == DemonJarModel.DEMONJAR_MAPID
|
| | | || dataMapId == JadeDynastyBossModel.JADEDYNASTY_MAP
|
| | | || dataMapId == JadeDynastyTowerModel.DATA_MAPID
|
| | | || dataMapId == AllianceBossModel.DATAMAPID)
|
| | | || dataMapId == AllianceBossModel.DATAMAPID
|
| | | || dataMapId == RidingPetBossModel.RIDINGPETBOSS_MAP)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen("DemonJarBossLifeBarWin"))
|
| | | {
|
| | |
| | | if (dataMapId != DemonJarModel.DEMONJAR_MAPID
|
| | | && dataMapId != JadeDynastyBossModel.JADEDYNASTY_MAP
|
| | | && dataMapId != JadeDynastyTowerModel.DATA_MAPID
|
| | | && dataMapId != AllianceBossModel.DATAMAPID)
|
| | | && dataMapId != AllianceBossModel.DATAMAPID
|
| | | && dataMapId != RidingPetBossModel.RIDINGPETBOSS_MAP)
|
| | | {
|
| | | ShowBossLifeBar(bossInfo, true);
|
| | | }
|
| | |
| | | if (dataMapId != DemonJarModel.DEMONJAR_MAPID
|
| | | && dataMapId != JadeDynastyBossModel.JADEDYNASTY_MAP
|
| | | && dataMapId != JadeDynastyTowerModel.DATA_MAPID
|
| | | && dataMapId != AllianceBossModel.DATAMAPID)
|
| | | && dataMapId != AllianceBossModel.DATAMAPID
|
| | | && dataMapId != RidingPetBossModel.RIDINGPETBOSS_MAP)
|
| | | {
|
| | | if (bossInfo.npcId != TargetBriefInfo.bossInfo.npcId)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | });
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().ShowUICtrl();
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().ShowTip();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | [SerializeField] Text m_EquipSorce; |
| | | [SerializeField] Button m_Select; |
| | | [SerializeField] RectTransform m_SelectedContainer; |
| | | [SerializeField] Material m_NormalMaterial; |
| | | [SerializeField] Material m_GrayMaterial; |
| | | |
| | | EquipModel model { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | |
| | | m_ItemCell.button.enabled = false; |
| | | |
| | | var isEquipLevelUnlocked = model.IsLevelUnLocked(equip.config.LV); |
| | | m_BackGround.gray = !isEquipLevelUnlocked; |
| | | |
| | | m_BackGround.material = isEquipLevelUnlocked ? m_NormalMaterial : m_GrayMaterial; |
| | | m_UnLockLabel.gameObject.SetActive(!isEquipLevelUnlocked); |
| | | m_EquipName.text = equip.config.ItemName; |
| | | m_EquipName.color = UIHelper.GetUIColor(equip.config.ItemColor, true); |
| | |
| | | var equip = packModel.GetItemByGuid(this.candidateEquip.guid); |
| | | tipModel.SetItemTipsModel(PackType.Item, equip.guid, false, true); |
| | | tipModel.SetBagTipsBtn(tipModel.curAttrData); |
| | | tipModel.ShowUICtrl(); |
| | | tipModel.ShowTip(); |
| | | |
| | | if (this.candidateEquip.selected.value) |
| | | { |
| | |
| | | { |
| | | tipModel.SetItemTipsModel(PackType.Equip, slot.equip.value, false); |
| | | tipModel.SetPutOnTipsBtn(tipModel.curAttrData); |
| | | tipModel.ShowUICtrl(); |
| | | tipModel.ShowTip(); |
| | | } |
| | | else if (model.HasSamePlaceCandidateEquip(slot.equipPosition)) |
| | | { |
| | |
| | | {
|
| | | var itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>();
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, equipGuid, false, true);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | itemTipsModel.ShowTip();
|
| | | });
|
| | |
|
| | | var maxStar = EquipStarModel.GetMaxStarLevel(equip.config.ItemColor, equip.config.LV);
|
| | |
| | | m_ItemEquip.button.SetListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, equipGuid, false, true);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | itemTipsModel.ShowTip();
|
| | | });
|
| | | }
|
| | | var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace);
|
| | |
| | | m_ItemEquip.button.SetListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, equipGuid, false, true);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | itemTipsModel.ShowTip();
|
| | | }); |
| | | } |
| | | m_TextNumber.text = "+" + (equipLv + 1); |
| | |
| | | m_ItemEquip.button.SetListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, equipGuid, false, true);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | itemTipsModel.ShowTip();
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | { |
| | | [SerializeField] RectTransform m_Empty; |
| | | [SerializeField] ItemBehaviour m_Item; |
| | | [SerializeField] Text m_Count; |
| | | [SerializeField] Button m_AddMaterial; |
| | | [SerializeField] RectTransform m_Locked; |
| | | |
| | |
| | | |
| | | bool isUnLocked = false; |
| | | int itemId = 0; |
| | | int itemNeed = 0; |
| | | |
| | | public void Display(bool isUnLocked, int itemId) |
| | | public void Display(bool isUnLocked, int itemId, int itemNeed) |
| | | { |
| | | this.isUnLocked = isUnLocked; |
| | | this.itemId = itemId; |
| | | this.itemNeed = itemNeed; |
| | | |
| | | DisplayBaseInfo(); |
| | | m_AddMaterial.SetListener(AddMaterials); |
| | |
| | | { |
| | | m_Item.gameObject.SetActive(true); |
| | | m_Item.SetItem(itemId, 1); |
| | | m_Count.gameObject.SetActive(true); |
| | | m_Count.text = StringUtility.Contact(own, "/", itemNeed); |
| | | m_Count.color = UIHelper.GetUIColor(own >= itemNeed ? TextColType.Green : TextColType.Red); |
| | | |
| | | m_Empty.gameObject.SetActive(false); |
| | | m_AddMaterial.gameObject.SetActive(false); |
| | |
| | | else |
| | | { |
| | | m_Item.gameObject.SetActive(false); |
| | | m_Count.gameObject.SetActive(false); |
| | | m_Empty.gameObject.SetActive(true); |
| | | m_AddMaterial.gameObject.SetActive(true); |
| | | } |
| | |
| | | m_Empty.gameObject.SetActive(true); |
| | | m_AddMaterial.gameObject.SetActive(false); |
| | | m_Item.gameObject.SetActive(false); |
| | | m_Count.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | m_TargetEquip.gameObject.SetActive(true); |
| | | m_TargetEquip.Init(equip); |
| | | m_TargetEquip.button.SetListener(ViewEquipTip); |
| | | currentStarLevel = model.GetEquipStarLevel(equipPosition); |
| | | |
| | | m_EquipStar.gameObject.SetActive(true); |
| | |
| | | m_Materials[i].Display(false); |
| | | } |
| | | |
| | | m_Materials.materialSpecial.Display(false, 0); |
| | | m_Materials.materialSpecial.Display(false, 0, 0); |
| | | } |
| | | else |
| | | { |
| | |
| | | m_Materials[i].Display(starConfig != null && i <= starConfig.CostEquipCnt); |
| | | } |
| | | |
| | | m_Materials.materialSpecial.Display(starConfig != null && starConfig.CostItemDict.x != 0, starConfig.CostItemDict.x); |
| | | if (starConfig != null) |
| | | { |
| | | m_Materials.materialSpecial.Display(starConfig.CostItemDict.x != 0, starConfig.CostItemDict.x, starConfig.CostItemDict.y); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | m_EffectFailed.Play(); |
| | | } |
| | | |
| | | private void ViewEquipTip() |
| | | { |
| | | var level = model.selectedLevel.value; |
| | | var place = model.selectedPlace.value; |
| | | var equipPosition = new Int2(level, place); |
| | | var equipGuid = equipModel.GetEquip(equipPosition); |
| | | |
| | | var itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>(); |
| | | itemTipsModel.SetItemTipsModel(PackType.Item, equipGuid, false, true); |
| | | itemTipsModel.ShowTip(); |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public class ImageCouple |
| | | { |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | {
|
| | | base.Display(_data);
|
| | | bossId = (int)_data;
|
| | |
|
| | | var bossInfoQuery = m_RefreshAtOnce.AddMissingComponent<RebornRightNowBossInfoQuery>();
|
| | | bossInfoQuery.bossId = bossId;
|
| | | findPreciousModel.bossSubscribeChangeEvent -= OnSubscribe;
|
| | |
| | | [SerializeField] FunctionButton m_FairyGrabBoss; |
| | | [SerializeField] FunctionButton m_DogzDungeon; |
| | | [SerializeField] FunctionButton m_JadeDynastyBoss; |
| | | [SerializeField] FunctionButton m_RidingPetContention; |
| | | |
| | | [SerializeField] Button m_Left; |
| | | [SerializeField] Button m_Right; |
| | |
| | | { |
| | | m_DemonJar.AddListener(ShowDemonJar); |
| | | m_DogzDungeon.AddListener(ShowDogzDungeon); |
| | | m_RidingPetContention.AddListener(ShowRidingPetContention); |
| | | m_FairyGrabBoss.AddListener(FairyGrabBoss); |
| | | m_JadeDynastyBoss.AddListener(JadeDynastyBoss); |
| | | m_Left.AddListener(ShowLastFunction); |
| | |
| | | functionOrder = m_DogzDungeon.order; |
| | | } |
| | | |
| | | private void ShowRidingPetContention()
|
| | | {
|
| | | CloseSubWindows();
|
| | | WindowCenter.Instance.Open<RidingPetContentionWin>();
|
| | | functionOrder = m_RidingPetContention.order;
|
| | | } |
| | | |
| | | private void JadeDynastyBoss()
|
| | | {
|
| | | CloseSubWindows();
|
| | |
| | |
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | HazyRegionModel model { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | | #region Built-in
|
| | |
| | |
|
| | | private void DailyQuestProgressUpdateEvent(int id)
|
| | | {
|
| | | if (id == (int)DailyQuestType.HazyRegion)
|
| | | var config = DailyQuestConfig.Get((int)DailyQuestType.HazyRegion);
|
| | | if (config != null && id == config.RelatedID)
|
| | | {
|
| | | DisplayTimes();
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (!model.TryAddTimes())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var itemCount = packModel.GetItemCountByID(PackType.Item, dailyQuestOpenTime.DayItemID);
|
| | | if (itemCount <= 0)
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (!model.TryAddTimes())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (PlayerDatas.Instance.baseData.diamond < dailyQuestOpenTime.BuyNeedMoney)
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | |
| | |
|
| | | void DisplayTimes()
|
| | | {
|
| | | var config = DailyQuestConfig.Get((int)DailyQuestType.HazyRegion);
|
| | | var dailyQuestOpenTime = DailyQuestOpenTimeConfig.Get(config.RelatedID);
|
| | | var limitTimes = dailyQuestOpenTime.DayTimes;
|
| | |
|
| | | var totalTimes = dailyQuestModel.GetDailyQuestTotalTimes((int)DailyQuestType.HazyRegion);
|
| | | var completedTimes = dailyQuestModel.GetDailyQuestCompletedTimes((int)DailyQuestType.HazyRegion);
|
| | | var times = Mathf.Clamp(totalTimes - completedTimes, 0, totalTimes);
|
| | | m_Times.text = StringUtility.Contact(times, "/", totalTimes);
|
| | | var times = Mathf.Clamp(totalTimes - completedTimes, 0, limitTimes);
|
| | | m_Times.text = StringUtility.Contact(times, "/", limitTimes);
|
| | | }
|
| | |
|
| | | void DisplayOpenTime()
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (!model.TryAddTimes())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | WindowCenter.Instance.Open<HazyRegionBuyTimesWin>();
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void DailyQuestProgressUpdateEvent(int id)
|
| | | {
|
| | | if (id == (int)DailyQuestType.HazyRegion)
|
| | | var config = DailyQuestConfig.Get((int)DailyQuestType.HazyRegion);
|
| | | if (config != null && id == config.RelatedID)
|
| | | {
|
| | | DisplayTimes();
|
| | | }
|
| | |
| | | var config = HazyRegionConfig.Get(incidentId);
|
| | | incidentType = (HazyRegionIncidentType)config.incidentType;
|
| | |
|
| | | DisplayBase();
|
| | | DisplayItems();
|
| | | DisplayState();
|
| | | DisplaySelect();
|
| | | DisplayBoss();
|
| | | //DisplayBase();
|
| | | //DisplayItems();
|
| | | //DisplayState();
|
| | | //DisplaySelect();
|
| | | //DisplayBoss();
|
| | |
|
| | | model.selectIncidentRefresh -= SelectIncidentRefresh;
|
| | | model.selectIncidentRefresh += SelectIncidentRefresh;
|
| | |
| | |
|
| | | private void SelectIncidentRefresh()
|
| | | {
|
| | | DisplaySelect();
|
| | | //DisplaySelect();
|
| | | }
|
| | |
|
| | | private void OnHazyRegionIncidentRefresh()
|
| | | {
|
| | | DisplayState();
|
| | | //DisplayState();
|
| | | }
|
| | |
|
| | | private void OnSelect()
|
| | |
| | |
|
| | | public void Display()
|
| | | {
|
| | | DisplayPoint();
|
| | | //DisplayPoint();
|
| | | DisplayIncidents();
|
| | | }
|
| | |
|
| | |
| | | public event Action<int> onHazyRegionStateRefresh; //0-结束拜访 1-开始拜访 2-强制刷新
|
| | | public event Action onHazyRegionIncidentRefresh;
|
| | |
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | |
| | |
|
| | | void ParseConfig()
|
| | | {
|
| | | var funcConfig = FuncConfigConfig.Get("ImmortalDomainStrength");
|
| | | limitPoint = int.Parse(funcConfig.Numerical1);
|
| | | }
|
| | |
|
| | | public bool TryGetIncident(int id, out Incident incident)
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | public bool TryAddTimes()
|
| | | {
|
| | | var config = DailyQuestConfig.Get((int)DailyQuestType.HazyRegion);
|
| | | var dailyQuestOpenTime = DailyQuestOpenTimeConfig.Get(config.RelatedID);
|
| | | var limitTimes = dailyQuestOpenTime.DayTimes;
|
| | |
|
| | | var totalTimes = dailyQuestModel.GetDailyQuestTotalTimes((int)DailyQuestType.HazyRegion);
|
| | | var completedTimes = dailyQuestModel.GetDailyQuestCompletedTimes((int)DailyQuestType.HazyRegion);
|
| | | var times = Mathf.Clamp(totalTimes - completedTimes, 0, limitTimes);
|
| | |
|
| | | if (times >= limitTimes)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | return true;
|
| | | }
|
| | |
|
| | | public ICollection<int> GetAllIncidents()
|
| | | {
|
| | | return m_Incidents.Keys;
|
| | | }
|
| | |
|
| | | public int GetIncidentId(int mapId, int lineId)
|
| | | {
|
| | | var configs = HazyRegionConfig.GetValues();
|
| | | foreach (var config in configs)
|
| | | {
|
| | | if (config.dungeonId == mapId && config.lineId == lineId)
|
| | | {
|
| | | return config.id;
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public void DisplayErrorRemind(int error)
|
| | |
| | | case HazyRegionIncidentType.FairyGrass:
|
| | | case HazyRegionIncidentType.ReikiGrass:
|
| | | case HazyRegionIncidentType.Precious:
|
| | | dungeonModel.SingleChallenge(config.dungeonId, config.lineId);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | void CloseHazyRegionIncident()
|
| | | {
|
| | | m_IncidentPanel.Dispose();
|
| | | m_IncidentPanel.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | void CloseHazyRegionEntrance()
|
| | | {
|
| | | m_EntrancePanel.Dispose();
|
| | | m_EntrancePanel.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | private void OnHazyRegionStateRefresh(int state)
|
| | |
| | | public BaseInfo baseInfo; |
| | | public BaseProperty baseProperty; |
| | | public LegendProperty legendProperty; |
| | | public SkillInfo skillInfo; |
| | | public SuitInfo suitInfo; |
| | | public StarInfo starInfo; |
| | | public StrengthenProperty strengthenProperty; |
| | |
| | | { |
| | | public int level; |
| | | public List<Int2> properties; |
| | | } |
| | | |
| | | public struct SkillInfo |
| | | { |
| | | public List<int> skills; |
| | | } |
| | | |
| | | static PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | |
| | | baseInfo = GetBaseInfo(guid), |
| | | baseProperty = GetBaseProperty(guid), |
| | | legendProperty = GetLegendProperty(guid), |
| | | skillInfo = GetSkillInfo(item.itemId), |
| | | suitInfo = GetSuitInfo(guid), |
| | | starInfo = GetStarInfo(item.itemId), |
| | | strengthenProperty = GetStrengthenProperty(guid), |
| | |
| | | baseInfo = GetBaseInfo(itemId), |
| | | baseProperty = GetBaseProperty(itemId), |
| | | legendProperty = GetLegendProperty(itemId), |
| | | skillInfo = GetSkillInfo(itemId), |
| | | suitInfo = GetSuitInfo(itemId), |
| | | gemInfo = GetGemInfo(itemId), |
| | | }; |
| | |
| | | baseInfo = GetBaseInfo(guid), |
| | | baseProperty = GetBaseProperty(item.itemId), |
| | | legendProperty = GetLegendProperty(item.itemId), |
| | | skillInfo = GetSkillInfo(item.itemId), |
| | | suitInfo = GetSuitInfo(item.itemId), |
| | | operates = GetOperates(guid), |
| | | }; |
| | |
| | | break; |
| | | case ItemOperateType.putAway: |
| | | ItemOperateUtility.Instance.PutAway(guid); |
| | | break; |
| | | case ItemOperateType.putIn: |
| | | ItemOperateUtility.Instance.PutInWareHouse(guid); |
| | | break; |
| | | case ItemOperateType.putOut: |
| | | ItemOperateUtility.Instance.TakeOutFromWarehouse(guid); |
| | | break; |
| | | case ItemOperateType.sell: |
| | | var item = packModel.GetItemByGuid(guid); |
| | |
| | | return trainProperty; |
| | | } |
| | | |
| | | private static SkillInfo GetSkillInfo(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | if (config == null) |
| | | { |
| | | return default(SkillInfo); |
| | | } |
| | | |
| | | var skillInfo = new SkillInfo(); |
| | | skillInfo.skills = new List<int>(); |
| | | |
| | | if (config.AddSkill1 != 0) |
| | | { |
| | | skillInfo.skills.Add(config.AddSkill1); |
| | | } |
| | | |
| | | if (config.AddSkill2 != 0) |
| | | { |
| | | skillInfo.skills.Add(config.AddSkill2); |
| | | } |
| | | |
| | | return skillInfo; |
| | | } |
| | | |
| | | private static List<ItemOperateType> GetOperates(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | |
| | | |
| | | var operates = new List<ItemOperateType>(); |
| | | var packType = item.packType; |
| | | |
| | | if (WindowCenter.Instance.IsOpen("DepotWin")) |
| | | { |
| | | switch (packType) |
| | | { |
| | | case PackType.Warehouse: |
| | | operates.Add(ItemOperateType.putOut); |
| | | break; |
| | | default: |
| | | operates.Add(ItemOperateType.putIn); |
| | | break; |
| | | } |
| | | |
| | | return operates; |
| | | } |
| | | |
| | | switch (packType) |
| | | { |
| | | case PackType.Equip: |
| | |
| | | operates.Add(ItemOperateType.train); |
| | | } |
| | | break; |
| | | case PackType.Warehouse: |
| | | operates.Add(ItemOperateType.putOut); |
| | | break; |
| | | default: |
| | | if (item.isAuction) |
| | | { |
| | |
| | | public TipEquipBaseInfoWidget baseInfoWidget; |
| | | public TipBasePropertyWidget basePropertyWidget; |
| | | public TipLegendPropertyWidget legendPropertyWidget; |
| | | public TipSkillInfoWidget skillInfoWidget; |
| | | public TipSuitBriefWidget suitBriefWidget; |
| | | public TipSuitPropertyWidget suitPropertyWidget; |
| | | public TipGemInfoWidget gemInfoWidget; |
| | |
| | | if (hasLegendProperty) |
| | | { |
| | | legendPropertyWidget.Display(data.legendProperty); |
| | | } |
| | | |
| | | var hasSkill = !data.skillInfo.skills.IsNullOrEmpty(); |
| | | skillInfoWidget.gameObject.SetActive(hasSkill); |
| | | if (hasSkill) |
| | | { |
| | | skillInfoWidget.Display(data.skillInfo); |
| | | } |
| | | |
| | | var hasSuit = data.suitInfo.places != null; |
| | |
| | | case ItemOperateType.sell: |
| | | this.title.text = "出售"; |
| | | break; |
| | | case ItemOperateType.putOut: |
| | | this.title.text = "取出"; |
| | | break; |
| | | case ItemOperateType.putIn: |
| | | this.title.text = "放入"; |
| | | break; |
| | | default: |
| | | this.title.text = ""; |
| | | break; |
| | |
| | | case ItemOperateType.inlay: |
| | | this.m_Title.text = "镶嵌"; |
| | | break; |
| | | case ItemOperateType.putOut: |
| | | this.m_Title.text = "取出"; |
| | | break; |
| | | case ItemOperateType.putIn: |
| | | this.m_Title.text = "放入"; |
| | | break; |
| | | default: |
| | | this.m_Title.text = ""; |
| | | break; |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, April 08, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class TipSkillInfoWidget : MonoBehaviour |
| | | { |
| | | |
| | | [SerializeField] Text m_SkillInfo; |
| | | |
| | | public void Display(EquipTipUtility.SkillInfo skillInfo) |
| | | { |
| | | var skills = skillInfo.skills; |
| | | var lines = new string[skills.Count]; |
| | | |
| | | for (var i = 0; i < skills.Count; i++) |
| | | { |
| | | var config = SkillConfig.Get(skills[i]); |
| | | var skillName = UIHelper.AppendColor(TextColType.Green, config.SkillName); |
| | | lines[i] = StringUtility.Contact(skillName, " ", config.Description); |
| | | } |
| | | |
| | | m_SkillInfo.text = string.Join("\r\n", lines); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta
copy to System/ItemTip/TipSkillInfoWidget.cs.meta
| File was copied from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: daf42844aeeb3ce48a661b3e1cdf146b |
| | | timeCreated: 1541424855 |
| | | licenseType: Free |
| | | guid: a3ab5219a8fd60b4f8b33ce9f9d3419c |
| | | timeCreated: 1554694958 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | |
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, _guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | itemTipsModel.ShowTip();
|
| | |
|
| | | model.ReportConfirmBetterEquip(model.currentEquipGuid);
|
| | | }
|
| | |
| | | return; |
| | | } |
| | | |
| | | if (item.isAuction)
|
| | | {
|
| | | return;
|
| | | } |
| | | |
| | | if (item.config.UseLV > PlayerDatas.Instance.baseData.LV) |
| | | { |
| | | return; |
| | |
| | | GameNetSystem.Instance.SendInfo(putInWarehouse); |
| | | } |
| | | |
| | | public void TakeOutFromWarehouse(ItemOperateType btnType, string guid) |
| | | public void TakeOutFromWarehouse(string guid) |
| | | { |
| | | var itemModel = packModel.GetItemByGuid(guid); |
| | | if (itemModel == null) |
| | |
| | | string expValueFormula = "";
|
| | | Dictionary<int, string> exhaustedAttrFormula { get; set; }
|
| | | Dictionary<int, int> exhaustedMaxLvDict { get; set; }
|
| | | int[] guardAutoDrops;
|
| | |
|
| | | public int[] gemOpenLvs { get; private set; }
|
| | | public int[] jadeDynastyGemOpenLvs { get; private set; }
|
| | |
| | |
|
| | | guardDesDict = new Dictionary<int, List<string>>();
|
| | | FuncConfigConfig guardDesFunc = FuncConfigConfig.Get("GuardianTips");
|
| | | FuncConfigConfig guardAutoDropFunc = FuncConfigConfig.Get("GuardianPickUpID");
|
| | | guardAutoDrops = ConfigParse.GetMultipleStr<int>(guardAutoDropFunc.Numerical1);
|
| | | JsonData guardDesData = JsonMapper.ToObject(guardDesFunc.Numerical1);
|
| | | foreach (var key in guardDesData.Keys)
|
| | | {
|
| | |
| | |
|
| | | if (isShowUINow)
|
| | | {
|
| | | ShowUICtrl();
|
| | | ShowTip();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | if (isShowUINow)
|
| | | {
|
| | | ShowUICtrl();
|
| | | ShowTip();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | , type, itemModel.guid, ConfigParse.Analysis(itemModel.itemInfo.userData));
|
| | | }
|
| | |
|
| | | public void ShowUICtrl()
|
| | | public void ShowTip()
|
| | | {
|
| | | if (curAttrData == null) return;
|
| | |
|
| | |
| | | string jobName = "";
|
| | | public string GetEquipJobName(ItemAttrData attrData)
|
| | | {
|
| | |
|
| | | jobName = "";
|
| | | if (attrData == null) return jobName;
|
| | |
|
| | |
| | | {
|
| | | if (attrData.itemConfig.JobLimit != 0)
|
| | | {
|
| | | JobNameConfig jobNameConfig = JobNameConfig.Get(attrData.itemConfig.JobLimit);
|
| | | if (playerJob >= equipJob)
|
| | | {
|
| | | jobName = UIHelper.AppendColor(TextColType.White, jobNameConfig.name);
|
| | | }
|
| | | else
|
| | | {
|
| | | jobName = UIHelper.AppendColor(TextColType.Red, jobNameConfig.name);
|
| | | }
|
| | | var config = JobNameConfig.Get(attrData.itemConfig.JobLimit);
|
| | | jobName = UIHelper.AppendColor(playerJob >= equipJob ? TextColType.White : TextColType.Red, config.name);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 设置仓库弹框按钮
|
| | | /// </summary>
|
| | | /// <param name="attrData"></param>
|
| | | public void SetDepotTipsBtn(ItemAttrData attrData)
|
| | | {
|
| | | if (attrData == null) return;
|
| | |
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putOut, (ItemWinBtnType, ItemAttrData) => { ItemOperateUtility.Instance.TakeOutFromWarehouse(ItemOperateType.putOut, attrData.guid); });
|
| | |
|
| | | }
|
| | |
|
| | | public void SetDogzItemBtn(ItemAttrData attrData)
|
| | | {
|
| | | if (attrData == null) return;
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 设置仓库弹框按钮
|
| | | /// </summary>
|
| | | /// <param name="attrData"></param>
|
| | | public void SetDepotBagTipsBtn(ItemAttrData attrData)
|
| | | {
|
| | | if (attrData == null) return;
|
| | |
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putIn,
|
| | | (ItemWinBtnType, ItemAttrData) => { ItemOperateUtility.Instance.PutInWareHouse(attrData.guid); }
|
| | | );
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | |
|
| | | public bool isHavePutLimit { get; private set; }
|
| | |
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | RuneModel runeModel { get { return ModelCenter.Instance.GetModel<RuneModel>(); } }
|
| | | GodBeastModel beastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
|
| | |
|
| | | public ItemAttrData(int id, bool isPreview = false, ulong count = 0, int index = -1, bool isCompare = false, PackType type = PackType.Deleted, string guid = "", Dictionary<int, List<int>> useDataDict = null, ItemTipChildType childType = ItemTipChildType.Normal)
|
| | |
| | | {
|
| | | exhaustedMaxDataDict.Add(ids[i], values[i]);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | //设置弹框的宝石数据
|
| | |
| | | {
|
| | | gridCell.itemCellBtn.onceClick = (int info) =>
|
| | | {
|
| | |
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | | itemTipsModel.SetDepotBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | |
|
| | | itemTipsModel.ShowTip();
|
| | | };
|
| | | gridCell.itemCellBtn.doubleClick = () =>
|
| | | {
|
| | |
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | itemTipsModel.ShowTip();
|
| | | };
|
| | | }
|
| | |
|
| | |
| | | using UnityEngine.EventSystems;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class DepotWin : TempKnapSackBasic
|
| | | {
|
| | |
| | | private SinglePack packModel;
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel
|
| | | {
|
| | | get
|
| | | {
|
| | | ItemTipsModel itemTipsModel {
|
| | | get {
|
| | | return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | PackModel _playerPack;
|
| | | PackModel playerPack
|
| | | {
|
| | | PackModel playerPack {
|
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | packModel = playerPack.GetSinglePack(PackType.Warehouse);
|
| | | OnCreateGridLineCell(_gridlineCtrl);
|
| | | |
| | |
|
| | | TimeDownMgr.CoolTimeData bagData;
|
| | | if(TimeDownMgr.Instance.Get(TimeDownMgr.CoolTimeType.BagSort,out bagData))
|
| | | if (TimeDownMgr.Instance.Get(TimeDownMgr.CoolTimeType.BagSort, out bagData))
|
| | | {
|
| | | bagData.func = RefreshBagSortTime;
|
| | | _bagSortImage.SetSprite("BlackBtn");
|
| | | _timeBagDown.text = Language.Get("BagWin_SortCDbtn_Text_1", Mathf.CeilToInt(bagData.duration-bagData.time));
|
| | | _timeBagDown.text = Language.Get("BagWin_SortCDbtn_Text_1", Mathf.CeilToInt(bagData.duration - bagData.time));
|
| | | _bagSortBtn.enabled = false;
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | _gridlineCtrl.JumpIndex(0);
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | }
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | for (childCode = 0; childCode < cell.transform.childCount; childCode++)
|
| | | {
|
| | | GridCell gridCell = cell.transform.GetChild(childCode).GetComponent<GridCell>();
|
| | |
| | | gridCell.itemCell.Init(itemModel, true);
|
| | | gridCell.itemCellBtn.onceClick = null;
|
| | | gridCell.itemCellBtn.doubleClick = null;
|
| | | gridCell.itemCellBtn.onceClick=(int info)=>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Warehouse,itemModel.guid,false,true);
|
| | | itemTipsModel.SetDepotTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | };
|
| | | gridCell.itemCellBtn.onceClick = (int info) =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Warehouse, itemModel.guid, false, true);
|
| | | itemTipsModel.ShowTip();
|
| | | };
|
| | | gridCell.itemCellBtn.doubleClick = () =>
|
| | | {
|
| | | ItemOperateUtility.Instance.TakeOutFromWarehouse(ItemOperateType.putOut, itemModel.guid);
|
| | | ItemOperateUtility.Instance.TakeOutFromWarehouse(itemModel.guid);
|
| | | };
|
| | | |
| | |
|
| | | }
|
| | | gridCell.lockBtn.onClick.RemoveAllListeners();
|
| | | gridCell.lockBtn.onClick.AddListener(() =>
|
| | |
| | | OnCreateGridLineCell(_gridlineCtrl);
|
| | | }
|
| | |
|
| | | public override void OnAddItemCell(PackType type,int index,int id)
|
| | | public override void OnAddItemCell(PackType type, int index, int id)
|
| | | {
|
| | | if (type != PackType.Warehouse)
|
| | | return;
|
| | |
| | |
|
| | | tipModel.SetItemTipsModel(PackType.Equip, item.guid, false);
|
| | | tipModel.SetPutOnTipsBtn(tipModel.curAttrData);
|
| | | tipModel.ShowUICtrl();
|
| | | tipModel.ShowTip();
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | itemTipsModel.ShowTip();
|
| | | }
|
| | | else
|
| | | {
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 553a9b041488000458f70910e659446e |
| | | folderAsset: yes |
| | | timeCreated: 1553495236 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using Snxxz.UI;
|
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | public class BottomTip : MonoBehaviour { |
| | | |
| | | [SerializeField] Text bottomText; |
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } } |
| | | public int m_ActivityID = 34; |
| | | |
| | | public void DisplayBottomStartTip()
|
| | | {
|
| | | DailyQuestOpenTime dailyQuestOpenTime;
|
| | | dailyQuestModel.TryGetOpenTime(m_ActivityID, out dailyQuestOpenTime);
|
| | | int secondsToNext = dailyQuestOpenTime.GetNextSessionSurplusTime();
|
| | | int hour = secondsToNext / 3600;
|
| | | int min = secondsToNext % 3600 / 60;
|
| | | int seconds = secondsToNext % 3600 % 60;
|
| | | bottomText.text = "<color=red>"+"活动开启倒计时:" + hour + "小时" + min + "分" + seconds + "秒"+"</color>";
|
| | | } |
| | | |
| | | public void DisplayBottomRemainTimeTip()
|
| | | {
|
| | | DailyQuestOpenTime dailyQuestOpenTime;
|
| | | dailyQuestModel.TryGetOpenTime(m_ActivityID, out dailyQuestOpenTime);
|
| | | HourMinute hourMin;
|
| | | dailyQuestOpenTime.TryGetNextOpenTime(out hourMin);
|
| | |
|
| | | DateTime endTime = new DateTime(TimeUtility.Year, TimeUtility.Month, TimeUtility.Day, hourMin.hourEnd, hourMin.minuteEnd, 0);
|
| | | TimeSpan remainTime = endTime - TimeUtility.ServerNow;
|
| | | bottomText.text = "<color=green>"+"活动剩余时间:" + remainTime.Hours + "小时" + remainTime.Minutes + "分" + remainTime.Seconds + "秒"+"</color>";
|
| | | } |
| | | } |
| File was renamed from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: daf42844aeeb3ce48a661b3e1cdf146b |
| | | timeCreated: 1541424855 |
| | | licenseType: Free |
| | | guid: 1cac12964546c3946b4c07e4a1ba90fe |
| | | timeCreated: 1553911102 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | public enum RewardPositionType
|
| | | {
|
| | | Left,
|
| | | Right
|
| | | } |
| | | |
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class Container_RidingPet : MonoBehaviour
|
| | | {
|
| | |
|
| | | [SerializeField] Text m_MountsBossName;
|
| | | [SerializeField] Text m_ActivityInfo;
|
| | | [SerializeField] RawImage m_BossRawImage;
|
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | | public int RawImagetestBossID = 50103006;
|
| | | public RewardPositionType rewardPositonType;
|
| | | [SerializeField] ItemCell[] m_RewardArray;
|
| | |
|
| | | public int bossIdIndex = 0;
|
| | | public int m_ActivityID = 34;
|
| | |
|
| | | public void DisplayBossName()
|
| | | {
|
| | | m_MountsBossName.text = ModelCenter.Instance.GetModel<RidingPetBossModel>().GetBossName(bossIdIndex);
|
| | | }
|
| | |
|
| | | public void DisplayBossRawImage()
|
| | | {
|
| | | var config = NPCConfig.Get(RawImagetestBossID);
|
| | | UI3DModelExhibition.Instance.ShowNPC(RawImagetestBossID, config.UIModeLOffset, config.UIModelRotation, m_BossRawImage);
|
| | | }
|
| | |
|
| | | public void StopShowBossRawImage()
|
| | | {
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | }
|
| | |
|
| | | public void StopShowAnotherBossImage()
|
| | | {
|
| | | UI3DModelExhibition.InstanceClone1.StopShow();
|
| | | }
|
| | |
|
| | | public void DisplayAnotherBossRawImage()
|
| | | {
|
| | | var config = NPCConfig.Get(RawImagetestBossID);
|
| | | UI3DModelExhibition.InstanceClone1.ShowNPC(RawImagetestBossID, config.UIModeLOffset, config.UIModelRotation, m_BossRawImage);
|
| | | }
|
| | |
|
| | | public void DisplaySpiritPetHP()
|
| | | {
|
| | | m_ActivityInfo.text = "剩余血量 " + ModelCenter.Instance.GetModel<RidingPetBossModel>().GetBossRemianedHP(bossIdIndex) + "%";
|
| | | }
|
| | |
|
| | | public void DisplayActivityTime()
|
| | | {
|
| | | DailyQuestOpenTime dailyQuestOpentime;
|
| | | dailyQuestModel.TryGetOpenTime(m_ActivityID, out dailyQuestOpentime);
|
| | | HourMinute hourMin;
|
| | | dailyQuestOpentime.TryGetNextOpenTime(out hourMin);
|
| | | m_ActivityInfo.text = "活动时间 " + hourMin.hourBegin + ":" + hourMin.minuteBegin;
|
| | | }
|
| | |
|
| | | public void DisplayRewardItem()
|
| | | {
|
| | | switch (rewardPositonType)
|
| | | {
|
| | | case RewardPositionType.Left:
|
| | | ModelIDArrayToRewardItem(ModelCenter.Instance.GetModel<RidingPetBossModel>().Boss1RewardIDArray);
|
| | | break;
|
| | | case RewardPositionType.Right:
|
| | | ModelIDArrayToRewardItem(ModelCenter.Instance.GetModel<RidingPetBossModel>().Boss2RewardIDArray);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | public void ModelIDArrayToRewardItem(int[] idArray)
|
| | | {
|
| | | for (int i = 0; i < idArray.Length; i++)
|
| | | {
|
| | | var itemConfig = ItemConfig.Get(idArray[i]);
|
| | | if (itemConfig != null)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1);
|
| | | m_RewardArray[i].Init(cellModel);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
copy from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta
copy to System/RidingPet/Container_RidingPet.cs.meta
| File was copied from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: daf42844aeeb3ce48a661b3e1cdf146b |
| | | timeCreated: 1541424855 |
| | | licenseType: Free |
| | | guid: f555c034244317d43bac755016b2469e |
| | | timeCreated: 1553495311 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class RidingPetBossHintWin : Window
|
| | | {
|
| | | [SerializeField] Text m_Progress;
|
| | | [SerializeField] RankBehaviour[] m_Ranks;
|
| | | [SerializeField] Text m_MyHurt;
|
| | | [SerializeField] Text m_MyRank; |
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | const long BOSSHP_TOTAL = 1000000000;
|
| | |
|
| | | void DisplayProgress()
|
| | | {
|
| | | var mission = dungeonModel.mission;
|
| | | var currentHp = (long)(mission.remainHPPer * 0.000001d * BOSSHP_TOTAL);
|
| | | var progress = 1 - (float)currentHp / BOSSHP_TOTAL;
|
| | | m_Progress.text = StringUtility.Contact((int)(progress * 100), "%");
|
| | | }
|
| | |
|
| | | void DisplayTop3HurtRank()
|
| | | {
|
| | | var mission = dungeonModel.mission;
|
| | | var hurtInfos = mission.hurtInfo;
|
| | | var index = 0;
|
| | | if (hurtInfos != null)
|
| | | {
|
| | | for (int i = 0; i < hurtInfos.Length; i++)
|
| | | {
|
| | | if (i < m_Ranks.Length)
|
| | | {
|
| | | m_Ranks[i].Display(hurtInfos[i].playerName, hurtInfos[i].totalHurt);
|
| | | }
|
| | | index++;
|
| | | }
|
| | | }
|
| | | for (int i = index; i < m_Ranks.Length; i++)
|
| | | {
|
| | | m_Ranks[i].Reset();
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayMyHurtRank()
|
| | | {
|
| | | var mission = dungeonModel.mission;
|
| | | m_MyHurt.text = UIHelper.ReplaceLargeNum(mission.myHurtTotal);
|
| | | m_MyRank.text = mission.myRank == 0 ? string.Empty : mission.myRank.ToString(); |
| | | }
|
| | |
|
| | | void DisplayAll()
|
| | | {
|
| | | DisplayProgress();
|
| | | DisplayTop3HurtRank();
|
| | | DisplayMyHurtRank();
|
| | | }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | dungeonModel.updateMissionEvent += DisplayAll;
|
| | | DisplayAll();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | dungeonModel.updateMissionEvent -= DisplayAll;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | |
| | | }
|
| | |
|
| | | [Serializable]
|
| | | public class RankBehaviour
|
| | | {
|
| | | [SerializeField] Text m_FairyName;
|
| | | [SerializeField] Text m_Hurt;
|
| | |
|
| | | public void Display(string fairyName, long hurt)
|
| | | {
|
| | | m_FairyName.text = fairyName;
|
| | | m_Hurt.text = UIHelper.ReplaceLargeNum(hurt);
|
| | | }
|
| | |
|
| | | public void Reset()
|
| | | {
|
| | | m_FairyName.text = string.Empty;
|
| | | m_Hurt.text = string.Empty;
|
| | | }
|
| | | }
|
| | | } |
copy from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta
copy to System/RidingPet/RidingPetBossHintWin.cs.meta
| File was copied from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: daf42844aeeb3ce48a661b3e1cdf146b |
| | | timeCreated: 1541424855 |
| | | licenseType: Free |
| | | guid: 53a286b959429cd42a6446c64d2de46d |
| | | timeCreated: 1554184819 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| New file |
| | |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | [XLua.Hotfix]
|
| | | public class RidingPetBossModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public int[] BossIDArray;
|
| | | public int[] Boss1RewardIDArray;
|
| | | public int[] Boss2RewardIDArray;
|
| | | public bool isActivityOver { get; private set; }
|
| | | public const int RIDINGPETBOSS_MAP = 31200;
|
| | | Dictionary<int, RidingPetBossLine> RidingPetBossLineDict = new Dictionary<int, RidingPetBossLine>();
|
| | | private string m_MountsBossID;
|
| | | private string m_Boss1RewardID;
|
| | | private string m_Boss2RewardID;
|
| | | public event Action GetRidingPetBossLineDictAction;
|
| | |
|
| | | public string MountsBossID
|
| | | {
|
| | | get
|
| | | {
|
| | | if (m_MountsBossID == null)
|
| | | {
|
| | | m_MountsBossID = FuncConfigConfig.Get("QCBOSSID").Numerical1;
|
| | | |
| | | }
|
| | | return m_MountsBossID;
|
| | | }
|
| | | }
|
| | |
|
| | | public string Boss1RewardID
|
| | | {
|
| | | get
|
| | | {
|
| | | if (m_Boss1RewardID == null)
|
| | | {
|
| | | m_Boss1RewardID = FuncConfigConfig.Get("QCBOSSID").Numerical2;
|
| | |
|
| | | }
|
| | | return m_Boss1RewardID;
|
| | | }
|
| | | }
|
| | |
|
| | | public string Boss2RewardID
|
| | | {
|
| | | get
|
| | | {
|
| | | if (m_Boss2RewardID == null)
|
| | | {
|
| | | m_Boss2RewardID = FuncConfigConfig.Get("QCBOSSID").Numerical3;
|
| | |
|
| | | }
|
| | | return m_Boss2RewardID;
|
| | | }
|
| | | }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | BossIDArray = ConfigParse.GetMultipleStr<int>(MountsBossID);
|
| | | Boss1RewardIDArray = ConfigParse.GetMultipleStr<int>(Boss1RewardID);
|
| | | Boss2RewardIDArray = ConfigParse.GetMultipleStr<int>(Boss2RewardID);
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | public void ReceivePackage(HAC07_tagGCHorsePetBossInfo package)
|
| | | {
|
| | | if (package.IsEnd == 1)
|
| | | {
|
| | | isActivityOver = true;
|
| | | }
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HA007_tagGCFBLinePlayerCnt package)
|
| | | {
|
| | | if (package.MapID != RIDINGPETBOSS_MAP)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | RidingPetBossLineDict.Clear();
|
| | |
|
| | | for (int i = 0; i < package.Count; i++)
|
| | | {
|
| | | var mapState = package.FBLineInfoList[i];
|
| | | RidingPetBossLineDict[mapState.FBLineID] = new RidingPetBossLine()
|
| | | {
|
| | | playerCnt = mapState.PlayerCnt,
|
| | | remainedHP = int.Parse(mapState.ExtraStr)
|
| | | };
|
| | | }
|
| | | if (GetRidingPetBossLineDictAction != null)
|
| | | {
|
| | | GetRidingPetBossLineDictAction();
|
| | | }
|
| | | }
|
| | |
|
| | | public string GetBossName(int index)
|
| | | {
|
| | | return NPCConfig.Get(BossIDArray[index]).charName;
|
| | | }
|
| | |
|
| | | public int GetBossRemianedHP(int index)
|
| | | {
|
| | | if (RidingPetBossLineDict.Count == 0 || !RidingPetBossLineDict.ContainsKey(index))
|
| | | {
|
| | | return 100;
|
| | | }
|
| | | else
|
| | | {
|
| | | return RidingPetBossLineDict[index].remainedHP;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public struct RidingPetBossLine
|
| | | {
|
| | | public int playerCnt;
|
| | | public int remainedHP;
|
| | | }
|
| | |
|
| | | }
|
copy from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta
copy to System/RidingPet/RidingPetBossModel.cs.meta
| File was copied from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: daf42844aeeb3ce48a661b3e1cdf146b |
| | | timeCreated: 1541424855 |
| | | licenseType: Free |
| | | guid: f098809addb595248b6974513a5c3889 |
| | | timeCreated: 1553244454 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class RidingPetBossVictoryWin : Window
|
| | | {
|
| | | [SerializeField] Transform m_ContainerPoivt;
|
| | | [SerializeField] ButtonEx m_Exit;
|
| | | [SerializeField] Text m_ExitTimer;
|
| | | [SerializeField] Transform m_ContainerTopThree;
|
| | | [SerializeField] Image m_Rank;
|
| | | [SerializeField] Transform m_ContainerOutThree;
|
| | | [SerializeField] Text m_RankText;
|
| | | [SerializeField] Transform m_ContainerAuctionReward;
|
| | | [SerializeField] HorizontalLayoutGroup m_AuctionItemRoot;
|
| | | [SerializeField] ScrollRect m_AuctionItemScroll;
|
| | | [SerializeField] List<DemonJarRewardBehaviour> m_AuctionItems;
|
| | | [SerializeField] HorizontalLayoutGroup m_MyItemRoot;
|
| | | [SerializeField] ScrollRect m_MyItemScroll;
|
| | | [SerializeField] List<DemonJarRewardBehaviour> m_MyItems;
|
| | | [SerializeField] Button m_GotoAucton;
|
| | |
|
| | | float timer = 0f;
|
| | |
|
| | | RidingPetBossModel ridingPetBossModel { get { return ModelCenter.Instance.GetModel<RidingPetBossModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_GotoAucton.AddListener(GotoAuction);
|
| | | m_Exit.AddListener(ExitDungeon);
|
| | | }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_ContainerPoivt.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | var config = DungeonOpenTimeConfig.Get(dungeonModel.dungeonResult.dataMapID);
|
| | | StartCoroutine(Co_DelayDisplay(config.DelayTime * 0.001f));
|
| | | }
|
| | | else
|
| | | {
|
| | | DisplayAll();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | base.LateUpdate();
|
| | |
|
| | | timer -= Time.deltaTime;
|
| | | if (timer < 0f)
|
| | | {
|
| | | timer += 0.5f;
|
| | | var endTime = dungeonModel.GetCoolDownEndTime(DungeonCoolDownType.LeaveMap);
|
| | | var seconds = (endTime - TimeUtility.ServerNow).TotalSeconds;
|
| | | DrawExitTimer((int)seconds);
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_DelayDisplay(float _delay)
|
| | | {
|
| | | yield return new WaitForSeconds(_delay);
|
| | | DisplayAll();
|
| | | }
|
| | |
|
| | | private void DisplayAll()
|
| | | {
|
| | | m_ContainerPoivt.gameObject.SetActive(true);
|
| | | DisplayDungeonExit();
|
| | | DisplayWinOrRank();
|
| | | DisplayAuctionItem();
|
| | | DisPlayMyItem();
|
| | | }
|
| | |
|
| | | void DisplayDungeonExit()
|
| | | {
|
| | | var endTime = dungeonModel.GetCoolDownEndTime(DungeonCoolDownType.LeaveMap);
|
| | | var seconds = (endTime - TimeUtility.ServerNow).TotalSeconds;
|
| | | timer = (float)seconds - (int)seconds;
|
| | |
|
| | | DrawExitTimer((int)seconds);
|
| | | }
|
| | |
|
| | | void DrawExitTimer(int seconds)
|
| | | {
|
| | | m_ExitTimer.text = Language.Get("DungeonVictoryWin_Btn_Exit_1", Mathf.Clamp(seconds, 0, int.MaxValue));
|
| | | }
|
| | |
|
| | | private void DisplayWinOrRank()
|
| | | {
|
| | | var result = dungeonModel.dungeonResult;
|
| | |
|
| | | bool top3 = result.rank <= 3 && result.rank > 0;
|
| | | m_ContainerTopThree.gameObject.SetActive(top3);
|
| | | m_ContainerOutThree.gameObject.SetActive(!top3);
|
| | | if (top3)
|
| | | {
|
| | | m_Rank.SetSprite(StringUtility.Contact("AllianceBossRank_", result.rank));
|
| | | }
|
| | | m_RankText.text = Language.Get("AllianceBossRank", result.rank);
|
| | | }
|
| | |
|
| | | private void GotoAuction()
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FairyAuction);
|
| | | }
|
| | |
|
| | | private void ExitDungeon()
|
| | | {
|
| | | dungeonModel.ExitCurrentDungeon();
|
| | | }
|
| | |
|
| | | private void DisplayAuctionItem()
|
| | | {
|
| | | var result = dungeonModel.dungeonResult;
|
| | | if (result.AuctionItem != null)
|
| | | {
|
| | | GenerateRewardBehaviour(m_AuctionItems,m_AuctionItemRoot.transform,result.AuctionItem.Length);
|
| | | m_AuctionItemScroll.horizontal = result.AuctionItem.Length > 3;
|
| | | m_AuctionItemRoot.childAlignment = result.AuctionItem.Length > 3 ? TextAnchor.MiddleLeft : TextAnchor.MiddleCenter;
|
| | | }
|
| | | m_AuctionItemScroll.horizontalNormalizedPosition = 0;
|
| | | var existAuctionItem = result.AuctionItem != null && result.AuctionItem.Length > 0;
|
| | | m_ContainerAuctionReward.gameObject.SetActive(existAuctionItem);
|
| | | if (existAuctionItem)
|
| | | {
|
| | | for (int i = 0; i < m_AuctionItems.Count; i++)
|
| | | {
|
| | | if (i < result.AuctionItem.Length)
|
| | | {
|
| | | var serverItem = result.AuctionItem[i];
|
| | | m_AuctionItems[i].gameObject.SetActive(true);
|
| | | m_AuctionItems[i].Display(new Item(serverItem.ItemID, serverItem.Count));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_AuctionItems[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void DisPlayMyItem()
|
| | | {
|
| | | var result = dungeonModel.dungeonResult;
|
| | | if (result.itemInfo != null)
|
| | | {
|
| | | GenerateRewardBehaviour(m_MyItems, m_MyItemRoot.transform, result.itemInfo.Length);
|
| | | m_MyItemScroll.horizontal = result.itemInfo.Length > 3;
|
| | | m_MyItemRoot.childAlignment = result.itemInfo.Length > 3 ? TextAnchor.MiddleLeft : TextAnchor.MiddleCenter;
|
| | | }
|
| | | m_MyItemScroll.horizontalNormalizedPosition = 0;
|
| | | for (int i = 0; i < m_MyItems.Count; i++)
|
| | | {
|
| | | if (result.itemInfo != null && i < result.itemInfo.Length)
|
| | | {
|
| | | var serverItem = result.itemInfo[i];
|
| | | m_MyItems[i].gameObject.SetActive(true);
|
| | | m_MyItems[i].Display(new Item(serverItem.ItemID, serverItem.Count));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_MyItems[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void GenerateRewardBehaviour(List<DemonJarRewardBehaviour> rewardBehaviours, Transform _parent, int _needCount)
|
| | | {
|
| | | var nowCount = rewardBehaviours.Count;
|
| | | var dif = _needCount - nowCount;
|
| | | if (dif > 0)
|
| | | {
|
| | | for (int i = 0; i < dif; i++)
|
| | | {
|
| | | var instance = UIUtility.CreateWidget("DemonJarRewardBehaviour", "DemonJarRewardBehaviour");
|
| | | var behaviour = instance.GetComponent<DemonJarRewardBehaviour>();
|
| | | rewardBehaviours.Add(behaviour);
|
| | | instance.transform.SetParentEx(_parent, Vector3.zero, Vector3.zero, Vector3.one);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
copy from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta
copy to System/RidingPet/RidingPetBossVictoryWin.cs.meta
| File was copied from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: daf42844aeeb3ce48a661b3e1cdf146b |
| | | timeCreated: 1541424855 |
| | | licenseType: Free |
| | | guid: 21afb33927741734ca35b87b7c2fea66 |
| | | timeCreated: 1554271297 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | {
|
| | | public class RidingPetContentionWin : Window
|
| | | {
|
| | | [SerializeField] Button m_MountsGoToButton;
|
| | | [SerializeField] Button m_SpiritPetGoToButton;
|
| | | [SerializeField] Container_RidingPet m_Container_Mounts;
|
| | | [SerializeField] Container_RidingPet m_Container_SpiritPet;
|
| | | [SerializeField] BottomTip m_BottomTip;
|
| | | MapModel mapModel { get { return ModelCenter.Instance.GetModel<MapModel>(); } }
|
| | | RidingPetBossModel ridingPetBossModel { get { return ModelCenter.Instance.GetModel<RidingPetBossModel>(); } }
|
| | | DungeonModel dungeondel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | |
|
| | | private float m_Timer = 0;
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_MountsGoToButton.AddListener(GoToKillMountsBoss);
|
| | | m_SpiritPetGoToButton.AddListener(GoToKillSpiritPetBoss);
|
| | | }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | m_Container_Mounts.StopShowBossRawImage();
|
| | | m_Container_SpiritPet.StopShowAnotherBossImage();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | ridingPetBossModel.GetRidingPetBossLineDictAction -= GetRidingBossDictPackageAction;
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_Container_Mounts.DisplayBossName();
|
| | | m_Container_SpiritPet.DisplayBossName();
|
| | | |
| | | ridingPetBossModel.GetRidingPetBossLineDictAction += GetRidingBossDictPackageAction;
|
| | | mapModel.RequestQueryMapLineState(RidingPetBossModel.RIDINGPETBOSS_MAP);
|
| | | GetRidingBossDictPackageAction();
|
| | | m_Container_Mounts.DisplayBossRawImage();
|
| | | m_Container_SpiritPet.DisplayAnotherBossRawImage();
|
| | | m_Container_Mounts.DisplayRewardItem();
|
| | | m_Container_SpiritPet.DisplayRewardItem();
|
| | | }
|
| | |
|
| | | private void GoToKillMountsBoss()
|
| | | {
|
| | | dungeondel.SingleChallenge(RidingPetBossModel.RIDINGPETBOSS_MAP, m_Container_Mounts.bossIdIndex);
|
| | | }
|
| | |
|
| | | private void GoToKillSpiritPetBoss()
|
| | | {
|
| | | dungeondel.SingleChallenge(RidingPetBossModel.RIDINGPETBOSS_MAP, m_Container_SpiritPet.bossIdIndex);
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | m_Timer += Time.deltaTime;
|
| | | if (m_Timer > 5)
|
| | | {
|
| | | mapModel.RequestQueryMapLineState(RidingPetBossModel.RIDINGPETBOSS_MAP);
|
| | | m_Timer -= 5;
|
| | | }
|
| | | UpdatebottomTip();
|
| | | }
|
| | |
|
| | | public void GetRidingBossDictPackageAction()
|
| | | {
|
| | | switch (dailyQuestModel.GetQuestState(m_Container_Mounts.m_ActivityID))
|
| | | {
|
| | | case DailyQuestModel.DailyQuestState.Completed:
|
| | | case DailyQuestModel.DailyQuestState.Normal:
|
| | | m_Container_Mounts.DisplaySpiritPetHP();
|
| | | break;
|
| | | default:
|
| | | m_Container_Mounts.DisplayActivityTime();
|
| | | break;
|
| | | }
|
| | |
|
| | | switch (dailyQuestModel.GetQuestState(m_Container_SpiritPet.m_ActivityID))
|
| | | {
|
| | | case DailyQuestModel.DailyQuestState.Completed:
|
| | | case DailyQuestModel.DailyQuestState.Normal:
|
| | | m_Container_SpiritPet.DisplaySpiritPetHP();
|
| | | break;
|
| | | default:
|
| | | m_Container_SpiritPet.DisplayActivityTime();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdatebottomTip()
|
| | | {
|
| | | switch (dailyQuestModel.GetQuestState(m_BottomTip.m_ActivityID))
|
| | | {
|
| | | case DailyQuestModel.DailyQuestState.Completed:
|
| | | case DailyQuestModel.DailyQuestState.Normal:
|
| | | m_BottomTip.DisplayBottomRemainTimeTip();
|
| | | break;
|
| | | default:
|
| | | m_BottomTip.DisplayBottomStartTip();
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
copy from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta
copy to System/RidingPet/RidingPetContentionWin.cs.meta
| File was copied from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: daf42844aeeb3ce48a661b3e1cdf146b |
| | | timeCreated: 1541424855 |
| | | licenseType: Free |
| | | guid: 43221548898cbbc4c9a345f385caddcb |
| | | timeCreated: 1553496711 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | | , "", null, ItemTipChildType.Buy);
|
| | | itemTipsModel.SetItemTipsModel(attrData, false);
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.buy, (ItemOperateType type, string id) => { OnClickBuyBtn(ItemOperateType.buy, shopInfo.ID); });
|
| | | itemTipsModel.ShowUICtrl();
|
| | | itemTipsModel.ShowTip();
|
| | | }
|
| | |
|
| | | public int BuyCnt { get; private set; }
|
| | |
| | | tipsModel.SetItemTipsModel(attrData, false);
|
| | | if (tipsModel.compareAttrData != null)
|
| | | {
|
| | | tipsModel.ShowUICtrl();
|
| | | tipsModel.ShowTip();
|
| | | }
|
| | | else
|
| | | {
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ee14af80141216d40bec149a394c6fc0 |
| | | folderAsset: yes |
| | | timeCreated: 1553503303 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using Snxxz.UI; |
| | | |
| | | public class testbutton : MonoBehaviour { |
| | | |
| | | [SerializeField] Button self; |
| | | |
| | | private void Awake()
|
| | | {
|
| | | self.onClick.AddListener(Open);
|
| | | }
|
| | | |
| | | private void Open()
|
| | | {
|
| | | WindowCenter.Instance.Open<RidingPetContentionWin>();
|
| | | } |
| | | } |
copy from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta
copy to Test/testbutton.cs.meta
| File was copied from Fight/Stage/Dungeon/FrontEndDungeon/FrontEndDungeon.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: daf42844aeeb3ce48a661b3e1cdf146b |
| | | timeCreated: 1541424855 |
| | | licenseType: Free |
| | | guid: de5511c7b581c4b45821bb3c09c156f0 |
| | | timeCreated: 1553503325 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | | normalTasks.Add(new ConfigInitTask("LegendPropertyValueConfig", () => { LegendPropertyValueConfig.Init(); }, () => { return LegendPropertyValueConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("LegendPropertyConfig", () => { LegendPropertyConfig.Init(); }, () => { return LegendPropertyConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipSuitNameConfig", () => { EquipSuitNameConfig.Init(); }, () => { return EquipSuitNameConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ReikiRootConfig", () => { ReikiRootConfig.Init(); }, () => { return ReikiRootConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("ReikiRootConfig", () => { ReikiRootConfig.Init(); }, () => { return ReikiRootConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("HazyRegionConfig", () => { HazyRegionConfig.Init(); }, () => { return HazyRegionConfig.inited; })); |
| | | } |
| | | |
| | | static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>(); |
| | |
| | | private int _param2;
|
| | | private Vector2 _start;
|
| | | private Vector2 _end;
|
| | |
|
| | | private int _triggerID;
|
| | | private Vector3 _start3;
|
| | | private Vector3 _end3;
|
| | | private int _triggerID = 8;
|
| | |
|
| | | public override void OnInspectorGUI()
|
| | | {
|
| | |
| | | _triggerID = EditorGUILayout.IntField("触发器ID", _triggerID);
|
| | | if (GUILayout.Button("触发客户端触发器"))
|
| | | {
|
| | | // ClientSceneManager.Instance.TriggerTest(_triggerID);
|
| | | GA_NpcFunc.SetNpcFuncVisible(10104003, true);
|
| | | }
|
| | | EditorGUILayout.EndHorizontal();
|
| | |
|
| | | if (GUILayout.Button("清空任务"))
|
| | | _start3 = EditorGUILayout.Vector3Field("起点: ", _start3);
|
| | | _end3 = EditorGUILayout.Vector3Field("终点: ", _end3);
|
| | |
|
| | | if (GUILayout.Button("测试寻路"))
|
| | | {
|
| | | CA225_tagCMClientTaskCount _a225 = new CA225_tagCMClientTaskCount
|
| | | {
|
| | | CountID = 10000
|
| | | };
|
| | | GameNetSystem.Instance.SendInfo(_a225);
|
| | | Debug.Log(PathFinder.WalkAble(_start3, _end3));
|
| | | }
|
| | |
|
| | | EditorGUILayout.LabelField("Log存储路径", RuntimeLogUtility.s_LogPath);
|
| | |
| | | // _npc.BornPos = _npc.Pos = PlayerDatas.Instance.hero.Pos;
|
| | | // _npc.ActorInfo.ResetHp(9999999, -1, 9999999);
|
| | |
|
| | | var _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightBoss>(10103001, E_ActorGroup.Enemy);
|
| | |
|
| | | // GActorPlayerBase.PlayerInfo _playerInfo = new GActorPlayerBase.PlayerInfo();
|
| | | // _playerInfo.maxHp = (uint)PlayerDatas.Instance.extersion.MaxMP;
|
| | | // _playerInfo.hp = _playerInfo.maxHp;
|