Merge branch 'master' into FashionDress
| | |
| | | {
|
| | | if (!loginModel.sdkLogined)
|
| | | {
|
| | | SDKUtility.Instance.FreePlatformLogin();
|
| | | if (SDKUtility.Instance.ChannelPlatform != SDKUtility.E_ChannelPlatform.Yj
|
| | | || !SDKUtility.Yj_AppID.Equals("yybgame"))
|
| | | {
|
| | | SDKUtility.Instance.FreePlatformLogin();
|
| | | }
|
| | |
|
| | | OperationLogCollect.Instance.RecordLauchEvent(4);
|
| | | OperationLogCollect.Instance.RecordEvent(4);
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, December 11, 2018 |
| | | // [ Date ]: Monday, January 07, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public int level { get ; private set ; }
|
| | | public string effect { get ; private set; }
|
| | | public int fightPower { get ; private set ; }
|
| | | public string attr { get ; private set; } |
| | | public string attr { get ; private set; } |
| | | public string icon { get ; private set; } |
| | | public string skillName { get ; private set; } |
| | | public Vector3 effectPosition { get ; private set; } |
| | | public Vector3 effectAngles { get ; private set; } |
| | | public Vector3 effectScale { get ; private set; } |
| | | |
| | | public override string getKey() |
| | | { |
| | |
| | |
|
| | | fightPower=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0;
|
| | |
|
| | | attr = rawContents[5].Trim(); |
| | | attr = rawContents[5].Trim();
|
| | | |
| | | icon = rawContents[6].Trim();
|
| | | |
| | | skillName = rawContents[7].Trim();
|
| | | |
| | | effectPosition=rawContents[8].Vector3Parse();
|
| | | |
| | | effectAngles=rawContents[9].Vector3Parse();
|
| | | |
| | | effectScale=rawContents[10].Vector3Parse(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c7a22e75f9a0eed49aed26e8171f8172 |
| | | timeCreated: 1544496205 |
| | | timeCreated: 1546827021 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | |
|
| | | public class PlayerExtersionData
|
| | | {
|
| | |
|
| | | public int MaxHP; // 最大HP 28,
|
| | | private int aaa;
|
| | | public int MaxHP
|
| | | {
|
| | | get { return aaa; }
|
| | | set
|
| | | {
|
| | | aaa = value;
|
| | | #if UNITY_EDITOR
|
| | | Debug.Log("Maxhp: " + aaa);
|
| | | #endif
|
| | | }
|
| | | } // 最大HP 28,
|
| | | public int MaxMP; // 最大MP 30,
|
| | | public int ExpRate; // 当前经验倍率 单位为百分比 35,
|
| | | public int DEF; // 外防 42
|
| | |
| | | base.Done(vNetPack);
|
| | |
|
| | | H0102_tagCDBPlayer vNetData = vNetPack as H0102_tagCDBPlayer;
|
| | | StageLoadTimeOutCatcher.got0102Time = DateTime.Now;
|
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(vNetPack.socketType, "0102", DateTime.Now);
|
| | |
|
| | | DEBUG_0102 = true;
|
| | | DTC0403_tagPlayerLoginLoadOK.finishedLogin = false;
|
| | |
| | | }
|
| | |
|
| | | StageLoadTimeOutCatcher.got0109Time = DateTime.Now;
|
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(vNetData.socketType, "0109", DateTime.Now);
|
| | |
|
| | | //修改技能快捷设置发包顺序
|
| | | PlayerDatas.Instance.skill.CheckQuickSet();
|
| | |
| | | mapOk.Type = 0;
|
| | | GameNetSystem.Instance.SendInfo(mapOk);
|
| | | DTCA127_tagMCStartChangeMap.isChangeLine = false;
|
| | |
|
| | | StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
|
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(GameNetSystem.SocketType.Main, "0107", DateTime.Now);
|
| | | }
|
| | | break;
|
| | | case GameNetSystem.SocketType.CrossSever:
|
| | |
| | | mapOk.MapID = PlayerDatas.Instance.baseData.MapID;
|
| | | mapOk.Type = 0;
|
| | | GameNetSystem.Instance.SendToCrossServer(mapOk);
|
| | |
|
| | | StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
|
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(GameNetSystem.SocketType.CrossSever, "0107", DateTime.Now);
|
| | | }
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | switch (vNetPack.socketType)
|
| | | {
|
| | | case GameNetSystem.SocketType.Main:
|
| | |
| | |
|
| | | if (StageManager.Instance.isLoading)
|
| | | {
|
| | | GAMgr.Instance.reAdjustPosList.Add(_actor);
|
| | | if (!GAMgr.Instance.reAdjustPosList.Contains(_actor))
|
| | | {
|
| | | GAMgr.Instance.reAdjustPosList.Add(_actor);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | { |
| | | if (_actor != null) |
| | | { |
| | | GAMgr.Instance.reAdjustPosList.Add(_actor); |
| | | if (!GAMgr.Instance.reAdjustPosList.Contains(_actor)) |
| | | { |
| | | GAMgr.Instance.reAdjustPosList.Add(_actor); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | OpponentInformation.Instance.GetOpponentInformation0418(vNetData);//用于获取玩家护盾属性 |
| | | if (PlayerDatas.Instance.PlayerId == vNetData.ObjID) |
| | | { |
| | | if ((PlayerDataRefresh)vNetData.ObjType == PlayerDataRefresh.HP) |
| | | if ((PlayerDataRefresh)vNetData.RefreshType == PlayerDataRefresh.HP) |
| | | { |
| | | bool _sync = false; |
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne()) |
| | |
| | | _player.SelectTarget = null;
|
| | | _player.InitBornPos(vNetData.PosX, vNetData.PosY);
|
| | | _player.ActorInfo.serverDie = false;
|
| | | _player.ActorInfo.ResetHp((int)_player.ActorInfo.MaxHp, (short)_player.ActorInfo.MaxHpEx);
|
| | | _player.ActorInfo.ResetHp(PlayerDatas.Instance.extersion.MaxHP, (short)_player.ActorInfo.MaxHpEx);
|
| | | _player.SelectTarget = null;
|
| | | _player.StopPathFind();
|
| | | _player.IdleImmediate();
|
| | |
| | |
|
| | | _player = GAMgr.Instance.RequestPlayer<GA_Player>(vNetData.PlayerID, E_ActorGroup.Player, vNetData);
|
| | |
|
| | | if (StageManager.Instance.isLoading)
|
| | | {
|
| | | if (!GAMgr.Instance.reAdjustPosList.Contains(_player))
|
| | | {
|
| | | GAMgr.Instance.reAdjustPosList.Add(_player);
|
| | | }
|
| | | }
|
| | |
|
| | | if (vNetData.IsAlive == 1)
|
| | | {
|
| | | if (vNetData.PlayerState == 1)
|
| | |
| | | |
| | | if (StageManager.Instance.isLoading) |
| | | { |
| | | GAMgr.Instance.reAdjustPosList.Add(_pet); |
| | | if (!GAMgr.Instance.reAdjustPosList.Contains(_pet)) |
| | | { |
| | | GAMgr.Instance.reAdjustPosList.Add(_pet); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | using Snxxz.UI; |
| | | using TableConfig; |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | public class DTCA126_tagMCPrepareChangeMap : DtcBasic |
| | | { |
| | |
| | | return; |
| | | } |
| | | |
| | | StageLoadTimeOutCatcher.gotA126Time = DateTime.Now; |
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(package.socketType, "A126", DateTime.Now); |
| | | |
| | | #if UNITY_EDITOR |
| | | string _content = string.Format("DTCA126_tagMCPrepareChangeMap => 准备切换地图"); |
| | | Debug.Log(_content); |
| | |
| | | using TableConfig; |
| | | using UnityEngine; |
| | | using System.Collections.Generic; |
| | | using System; |
| | | |
| | | public class DTCA127_tagMCStartChangeMap : DtcBasic |
| | | { |
| | |
| | | DEBUG_A127 = true; |
| | | |
| | | var package = vNetPack as HA127_tagMCStartChangeMap; |
| | | StageLoadTimeOutCatcher.gotA127Time = DateTime.Now; |
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(package.socketType, "A127", DateTime.Now); |
| | | |
| | | DEBUG_STEP = 0; |
| | | |
| | |
| | | _scale = _obstacle.transform.localScale.z * 0.25f;
|
| | | }
|
| | |
|
| | | int _effectID = 1040;
|
| | |
|
| | | if(CrossServerRewardModel.IsCrossServerOneVsOne())
|
| | | {
|
| | | _effectID = 5206;
|
| | | }
|
| | |
|
| | | if (package.BarrierList[i].Angle == 0)
|
| | | {
|
| | | // 创建特效
|
| | | SFXController _sfx = SFXPlayUtility.Instance.PlayWithEulerAngle(1040, _pos, _isHorizontal ? new Vector3(0, 0, 0) : new Vector3(0, 90, 0));
|
| | | SFXController _sfx = SFXPlayUtility.Instance.PlayWithEulerAngle(_effectID, _pos, _isHorizontal ? new Vector3(0, 0, 0) : new Vector3(0, 90, 0));
|
| | | _sfx.duration = 0;
|
| | | _sfx.transform.localScale = new Vector3(_scale, 1, 1);
|
| | | sfxDict.Add(id, _sfx);
|
| | | }
|
| | | else
|
| | | {
|
| | | SFXController _sfx = SFXPlayUtility.Instance.PlayWithEulerAngle(1040, _pos, new Vector3(0, package.BarrierList[i].Angle, 0));
|
| | | SFXController _sfx = SFXPlayUtility.Instance.PlayWithEulerAngle(_effectID, _pos, new Vector3(0, package.BarrierList[i].Angle, 0));
|
| | | _sfx.duration = 0;
|
| | | _sfx.transform.localScale = new Vector3(_scale, 1, 1);
|
| | | sfxDict.Add(id, _sfx);
|
| | |
| | | Sp = 3,// 思璞
|
| | | Js = 4,// 极速
|
| | | Yj = 5,// 易接
|
| | | Yl = 6,// 易乐
|
| | | }
|
| | |
|
| | | public E_ChannelPlatform ChannelPlatform { get; set; }
|
| | |
| | | }
|
| | |
|
| | | public static string Yj_SpID
|
| | | {
|
| | | get; private set;
|
| | | }
|
| | |
|
| | | public static string Yj_BanHao
|
| | | {
|
| | | get; private set;
|
| | | }
|
| | |
| | | {
|
| | | _result = "freeplatform";
|
| | | }
|
| | | else if (ChannelPlatform == E_ChannelPlatform.Yl)
|
| | | {
|
| | | _result = "yileplatform";
|
| | | }
|
| | | break;
|
| | | case RuntimePlatform.IPhonePlayer:
|
| | | _result = "ios";//ios平台固定返回ios
|
| | |
| | | else if (_channelPlatform.Equals("yj"))
|
| | | {
|
| | | ChannelPlatform = E_ChannelPlatform.Yj;
|
| | |
|
| | | }
|
| | | else if (_channelPlatform.Equals("yl"))
|
| | | {
|
| | | ChannelPlatform = E_ChannelPlatform.Yl;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (_dict.Contains("yj_appid"))
|
| | | if (ChannelPlatform == E_ChannelPlatform.Yj)
|
| | | {
|
| | | Yj_AppID = _json["yj_appid"].ToString();
|
| | | if (_dict.Contains("yj_appid"))
|
| | | {
|
| | | Yj_AppID = _json["yj_appid"].ToString();
|
| | | }
|
| | |
|
| | | if (_dict.Contains("yj_spid"))
|
| | | {
|
| | | Yj_SpID = _json["yj_spid"].ToString();
|
| | | }
|
| | | }
|
| | |
|
| | | if (_dict.Contains("yj_spid"))
|
| | | if (_dict.Contains("banhao"))
|
| | | {
|
| | | Yj_SpID = _json["yj_spid"].ToString();
|
| | | Yj_BanHao = _json["banhao"].ToString();
|
| | | }
|
| | |
|
| | | break;
|
| | |
| | | onFreePlatformPayCancel();
|
| | | }
|
| | | break;
|
| | | case CodeA2U.ExitGame:
|
| | | Snxxz.UI.WindowCenter.Instance.Open<Snxxz.UI.ExitGameWin>();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | * 回调外部存储根目录地址
|
| | | */
|
| | | public const int ExternalStorage = 5;
|
| | | /**
|
| | | * 触发了退出游戏逻辑, 打开二次确认界面
|
| | | */
|
| | | public const int ExitGame = 6;
|
| | | #endregion
|
| | | }
|
| | |
|
| | |
| | | public const int CreateRole = 106;
|
| | | public const int RoleLogin = 107;
|
| | | public const int RoleLevelUp = 108;
|
| | | public const int TencentLogin = 109;
|
| | | /**
|
| | | * 极光推送
|
| | | * */
|
| | |
| | | #endif
|
| | | }
|
| | |
|
| | | public void TencentLogin(string param)
|
| | | {
|
| | | #if !UNITY_EDITOR
|
| | | m_Json.Clear();
|
| | | m_Json["code"] = CodeU2A.TencentLogin;
|
| | | if (!string.IsNullOrEmpty(param))
|
| | | {
|
| | | m_Json["param"] = param;
|
| | | }
|
| | | SendMessageToSDK(m_Json);
|
| | | #endif
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 自由SDK登出
|
| | | /// </summary>
|
| | |
| | | {
|
| | | m_PaymentTable["RechargeChannel"] = "5";
|
| | | }
|
| | | else if (ChannelPlatform == E_ChannelPlatform.Yl)
|
| | | {
|
| | | m_PaymentTable["RechargeChannel"] = "6";
|
| | | }
|
| | |
|
| | | var _stringBuilder = new System.Text.StringBuilder();
|
| | | var _md5Body = _stringBuilder.Append(m_PaymentTable["AppID"]).
|
| | |
| | | _beatBack.NPCPosList[0].ObjID = (uint)target.ServerInstID;
|
| | | _beatBack.NPCPosList[0].PosX = (ushort)(_checkPos.x * 2f + GA_Hero.MapOffset.x);
|
| | | _beatBack.NPCPosList[0].PosY = (ushort)(_checkPos.z * 2f + GA_Hero.MapOffset.z);
|
| | | GameNetSystem.Instance.SendInfo(_beatBack);
|
| | |
|
| | | if (!GameNetSystem.Instance.crossServerSocketConnected)
|
| | | {
|
| | | GameNetSystem.Instance.SendInfo(_beatBack);
|
| | | }
|
| | | else
|
| | | {
|
| | | GameNetSystem.Instance.SendToCrossServer(_beatBack);
|
| | | }
|
| | | }
|
| | | }
|
| | | //else
|
| | |
| | | if (_fight == null)
|
| | | {
|
| | | #if UNITY_EDITOR
|
| | | Debug.LogErrorFormat("owner: {0} 类型问题: {1}" ,owner.ServerInstID, owner.GetType());
|
| | | Debug.LogErrorFormat("owner: {0} 类型问题: {1}", owner.ServerInstID, owner.GetType());
|
| | | #endif
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | _target.Die(owner.ServerInstID);
|
| | | }
|
| | | else
|
| | | {
|
| | | _target.ActorInfo.ResetHp((int)_target.ActorInfo.SyncServerHp, (short)_target.ActorInfo.SyncServerHpEx);
|
| | | }
|
| | |
|
| | | _target.ActorInfo.ResetHp((int)_target.ActorInfo.SyncServerHp, (short)_target.ActorInfo.SyncServerHpEx);
|
| | | // 主角血量扣除的补充
|
| | | if (_target.ServerInstID == PlayerDatas.Instance.PlayerId)
|
| | | {
|
| | |
| | |
|
| | | private void OnEnterNormalDungeon()
|
| | | {
|
| | | WindowCenter.Instance.Open<DungeonFightWin>();
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 0)
|
| | | {
|
| | | WindowCenter.Instance.Open<DungeonFightWin>();
|
| | | }
|
| | |
|
| | | WindowCenter.Instance.Open<DungeonBeginCoolDownWin>();
|
| | | WindowCenter.Instance.Open<DungeonEndCoolDownWin>();
|
| | |
|
| | |
| | | {
|
| | | if (!isClientChangeMap)
|
| | | {
|
| | | StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
|
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(this.socketType, "0107", DateTime.Now);
|
| | |
|
| | | var mapOk = new C0107_tagCInitMapOK();
|
| | | mapOk.MapID = PlayerDatas.Instance.baseData.MapID;
|
| | | mapOk.Type = 0;
|
| | |
| | | }
|
| | |
|
| | | _hero.State = E_ActorState.Idle;
|
| | | _hero.ActorInfo.ResetHp((int)PlayerDatas.Instance.baseData.HP, -1, (int)PlayerDatas.Instance.baseData.HP);
|
| | | _hero.ActorInfo.ResetHp((int)PlayerDatas.Instance.baseData.HP, -1, (int)PlayerDatas.Instance.extersion.MaxHP);
|
| | | _hero.CalculateMoveSpeed((ushort)PlayerDatas.Instance.extersion.SpeedValue);
|
| | | _hero.CalculateAtkSpeed(PlayerDatas.Instance.extersion.battleValEx1);
|
| | | _hero.InitBornPos(PlayerDatas.Instance.baseData.PosX, PlayerDatas.Instance.baseData.PosY);
|
| | |
| | | public Vector2 logoPosition { get { return m_LogoPosition; } }
|
| | |
|
| | | [SerializeField] string m_BanHao;
|
| | | public string banHao { get { return m_BanHao; } }
|
| | | public string banHao
|
| | | {
|
| | | get
|
| | | {
|
| | | if (!string.IsNullOrEmpty(SDKUtility.Yj_BanHao))
|
| | | {
|
| | | return SDKUtility.Yj_BanHao;
|
| | | }
|
| | | return m_BanHao;
|
| | | }
|
| | | }
|
| | |
|
| | | public void Read(string _data)
|
| | | {
|
| | |
| | | [SerializeField]
|
| | | Button onekeyPutBtn;
|
| | |
|
| | | [SerializeField] GameObject composeItemSelectObj;
|
| | |
|
| | | [SerializeField] UIEffect oneMatEffect;
|
| | | [SerializeField] UIEffect twoMatEffect;
|
| | | [SerializeField] UIEffect threeMatEffect;
|
| | |
| | | successRateText.text = Language.Get("HallowsWin_Success", StringUtility.Contact(compoundModel.successRate / 100, "%"));
|
| | | composeWinModel.SetCurComposeModel(compoundModel);
|
| | | UpdateComposeMat();
|
| | |
|
| | | composeItemSelectObj.SetActive(compoundModel.secondType < 4);
|
| | | }
|
| | |
|
| | | private bool ChangeFixedMatUI()
|
| | |
| | | OnCreateGridLineCel2(m_ScrollerController2);
|
| | | IsShowMyBuffBtn();
|
| | | IsShowOpponentBuffBtn();
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | | Viewport2.gameObject.SetActive(false);
|
| | | } |
| | | protected override void OnAfterOpen() |
| | | { |
| | | |
| | | |
| | | {
|
| | |
|
| | |
|
| | | HeroBehaviour.OnStopHandupAI += OnHeroHandupAIStopPassive;
|
| | | HeroBehaviour.OnStartHandupAI += OnHeroHandupAIStarted;
|
| | | dungeonModel.dungeonCoolDownEvent += DungeonCoolDownEvent; |
| | |
| | | OpponentInformation.Instance.ShieldUpdate -= ShieldUpdate; |
| | | }
|
| | |
|
| | | |
| | |
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | if (PlayerDatas.Instance.hero!=null && PlayerDatas.Instance.hero.aiHandler.IsAuto())
|
| | | if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.aiHandler.IsAuto())
|
| | | {
|
| | | m_AutoImg.SetActive(false);
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var surplus = dungeonEndTime - DateTime.Now; |
| | | var surplus = dungeonEndTime - DateTime.Now;
|
| | | m_CountdownText.text = (Mathf.CeilToInt((float)surplus.TotalSeconds)).ToString();
|
| | | }
|
| | |
|
| | | }
|
| | | #endregion |
| | | |
| | |
|
| | | private void OnHeroHpChanged(ulong hp)
|
| | | {
|
| | | PlaceOfBirthUpdate(positionType);
|
| | |
| | |
|
| | | private void BuffUpdateEvent(int playerID)
|
| | | {
|
| | | |
| | |
|
| | | int opponentPlayerId = CrossServerLogin.Instance.oneVsOnePlayerData.opponentPlayerId;
|
| | | if (playerID == opponentPlayerId)
|
| | | {
|
| | |
| | | }
|
| | | private void OnRefreshPlayerLifeBar(uint _instanceId, ulong _hp, ulong _maxHp)
|
| | | {
|
| | | // DebugEx.LogError("最大血量"+ _maxHp+"当前血量"+ _hp);
|
| | | // DebugEx.LogError("最大血量"+ _maxHp+"当前血量"+ _hp);
|
| | | if (positionType == 1)
|
| | | {
|
| | | m_RoleInformation2.SetHeroHP((int)_maxHp, (int)_hp);
|
| | |
| | | m_RoleInformation1.SetShieldNumber(CrossServerLogin.Instance.oneVsOnePlayerData.MaxProDef, shieldNow);
|
| | | }
|
| | | }
|
| | | // DebugEx.LogError("输出玩家的ID" + playerID+"输出当前护盾值"+ shieldNow);
|
| | | // DebugEx.LogError("输出玩家的ID" + playerID+"输出当前护盾值"+ shieldNow);
|
| | | }
|
| | | private void OnHeroHandupAIStopPassive()
|
| | | {
|
| | |
| | | m_ScoreText2.text = youWin.ToString();
|
| | | }
|
| | | else
|
| | | { |
| | | {
|
| | | m_ScoreText1.text = youWin.ToString();
|
| | | m_ScoreText2.text = myWin.ToString();
|
| | | }
|
| | |
| | | {
|
| | | _ScrollRect2.vertical = true;
|
| | | (Viewport2 as RectTransform).sizeDelta = (Viewport2 as RectTransform).sizeDelta.SetY(MaxHeight + UpperAndLower);
|
| | | } |
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | {
|
| | | _ScrollRect2.vertical = false;
|
| | | (Viewport2 as RectTransform).sizeDelta = (Viewport2 as RectTransform).sizeDelta.SetY(_MyBuffSortList.Count * ItemHeight + UpperAndLower);
|
| | | } |
| | | }
|
| | | }
|
| | | }
|
| | | void UpdateControllerPositionOppoent()
|
| | |
| | | m_RoleInformation1.SetHeroLvAndName((int)PlayerDatas.Instance.baseData.LV, PlayerName);
|
| | | m_RoleInformation1.SetHeroHP(PlayerDatas.Instance.extersion.MaxHP, (int)PlayerDatas.Instance.baseData.HP);
|
| | | m_RoleInformation1.SetShieldNumber(PlayerDatas.Instance.extersion.MaxProDef, (int)PlayerDatas.Instance.baseData.ExAttr4);
|
| | | #if UNITY_EDITOR
|
| | | Debug.LogFormat("设置血量: {0}/{1}", PlayerDatas.Instance.baseData.HP, PlayerDatas.Instance.extersion.MaxHP);
|
| | | #endif
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | m_RoleInformation2.SetHeroLvAndName((int)PlayerDatas.Instance.baseData.LV, PlayerName);
|
| | | m_RoleInformation2.SetHeroHP(PlayerDatas.Instance.extersion.MaxHP, (int)PlayerDatas.Instance.baseData.HP);
|
| | | m_RoleInformation2.SetShieldNumber(PlayerDatas.Instance.extersion.MaxProDef, (int)PlayerDatas.Instance.baseData.ExAttr4);
|
| | | #if UNITY_EDITOR
|
| | | Debug.LogFormat("设置血量: {0}/{1}", PlayerDatas.Instance.baseData.HP, PlayerDatas.Instance.extersion.MaxHP);
|
| | | #endif
|
| | | }
|
| | | }
|
| | |
|
| | | private void GetopponentBuff()//获取对手身上的Buff
|
| | | {
|
| | | List<int> buffIds=new List<int>();
|
| | | List<int> buffIds = new List<int>();
|
| | | _OpponentBuffSortList.Clear();
|
| | | StatusMgr.Instance.GetBuffIds((uint)CrossServerLogin.Instance.oneVsOnePlayerData.opponentPlayerId, ref buffIds);
|
| | | if (buffIds.Count > 0)
|
| | | { |
| | | {
|
| | | for (int i = 0; i < buffIds.Count; i++)
|
| | | {
|
| | | _OpponentBuffSortList.Add(buffIds[i]);
|
| | |
| | | public ulong totalExp { get; private set; }
|
| | |
|
| | | Dictionary<int, HourMinute> normalQuestionTimes = new Dictionary<int, HourMinute>();
|
| | | Dictionary<int, Dictionary<int, HourMinute>> specialQuestionTime =
|
| | | new Dictionary<int, Dictionary<int, HourMinute>>();
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | var specialList = DungeonSpecialStateTimeConfig.GetDungeonTimes(31230);
|
| | | for (int i = 0; i < specialList.Count; i++)
|
| | | {
|
| | | if (specialList[i].StateValue == 2)
|
| | | {
|
| | | var dayOfWeek = specialList[i].OpenServerWeek % 7;
|
| | | Dictionary<int, HourMinute> dict;
|
| | | if (!specialQuestionTime.TryGetValue(dayOfWeek, out dict))
|
| | | {
|
| | | dict = new Dictionary<int, HourMinute>();
|
| | | specialQuestionTime.Add(dayOfWeek, dict);
|
| | | }
|
| | | if (!dict.ContainsKey(specialList[i].OpenServerDay))
|
| | | {
|
| | | dict.Add(specialList[i].OpenServerDay, new HourMinute()
|
| | | {
|
| | | hourBegin = specialList[i].StartHour,
|
| | | hourEnd = specialList[i].EndHour,
|
| | | minuteBegin = specialList[i].StartMinute,
|
| | | minuteEnd = specialList[i].EndMinute,
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TryGetQuestionTime(out HourMinute time)
|
| | | {
|
| | | time = default(HourMinute);
|
| | | bool isSpecial = TimeUtility.OpenWeekCnt <= 1;
|
| | | if (isSpecial)
|
| | | var dayOfWeek = (int)TimeUtility.ServerNow.DayOfWeek;
|
| | | if (normalQuestionTimes.ContainsKey(dayOfWeek))
|
| | | {
|
| | | var openDayWeek = (int)TimeUtility.openServerDayOfWeek;
|
| | | if (specialQuestionTime.ContainsKey(openDayWeek))
|
| | | {
|
| | | var dict = specialQuestionTime[openDayWeek];
|
| | | var dayIndex = TimeUtility.OpenDay + 1;
|
| | | if (dict.ContainsKey(dayIndex))
|
| | | {
|
| | | time = dict[dayIndex];
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | var dayOfWeek = (int)TimeUtility.ServerNow.DayOfWeek;
|
| | | if (normalQuestionTimes.ContainsKey(dayOfWeek))
|
| | | {
|
| | | time = normalQuestionTimes[dayOfWeek];
|
| | | return true;
|
| | | }
|
| | | time = normalQuestionTimes[dayOfWeek];
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
| | | {
|
| | | packIndexs.Add(list[i]);
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (item.itemColor >= RARA_GATHERSOUL_QUALITY)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("RareGatherSoulResolveConfirm"), (bool isOk) =>
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BestGatherSoulResolveConfirm"), (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | |
| | | {
|
| | | GatherSoulItem item;
|
| | | virtualPack.TryGetItem(PackType.rptGatherSoul, packIndexs[0], out item);
|
| | | for (int i = 0; i < count; i++)
|
| | | if (item != null)
|
| | | {
|
| | | GatherSoulItem holeItem;
|
| | | if (TryGetItem(i, out holeItem))
|
| | | var hole = 0;
|
| | | if (SatisfyReplace(item, out hole))
|
| | | {
|
| | | if (SatisfyReplace(i, item) && item.Compare(holeItem) == 1)
|
| | | GatherSoulItem holeItem;
|
| | | if (TryGetItem(hole, out holeItem))
|
| | | {
|
| | | replaceRedpointIndex = item.index;
|
| | | replaceRedpoint.state = RedPointState.Simple;
|
| | | return;
|
| | | if (item.Compare(holeItem) == 1)
|
| | | {
|
| | | replaceRedpointIndex = item.index;
|
| | | replaceRedpoint.state = RedPointState.Simple;
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(id);
|
| | | this.ItemId = id;
|
| | | nameText.text = itemConfig.ItemName;
|
| | | ItemCellModel cellModel = new ItemCellModel(id, false, (ulong)BoxModel.selectDict[id]);
|
| | | ItemCellModel cellModel = new ItemCellModel(id, false, (ulong)BoxModel.selectDict[id],0,"",PackType.rptDeleted,true);
|
| | | itemBaisc.Init(cellModel);
|
| | | if (itemConfig.Effect1 == 220)
|
| | | {
|
| | |
| | | SDKUtility.Yj_AppID + "|" +
|
| | | SDKUtility.Instance.FreePlatformInfo.accountID);
|
| | | send.ExtraLen = (byte)send.Extra.Length;
|
| | | }else if(SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yl)
|
| | | {
|
| | | send.IDType = 6;
|
| | | }
|
| | | send.AccID = sdkLoginResult.account;
|
| | | send.Password = sdkLoginResult.token;
|
| | |
| | | [SerializeField] Text m_ServerName;
|
| | | [SerializeField] protected InputField m_Account;
|
| | | [SerializeField] Button m_EnterGame;
|
| | | [SerializeField] Button m_QQLogin;
|
| | | [SerializeField] Button m_WXLogin;
|
| | | [SerializeField] Button m_ServerSelect;
|
| | | [SerializeField] Button m_SwitchAccount;
|
| | | [SerializeField] Button m_Notice;
|
| | |
| | | protected override void AddListeners()
|
| | | {
|
| | | m_EnterGame.SetListener(EnterGame);
|
| | | m_QQLogin.SetListener(QQLogin);
|
| | | m_WXLogin.SetListener(WXLogin);
|
| | | m_ServerSelect.SetListener(OpenServerListWin);
|
| | | m_SwitchAccount.SetListener(SwitchAccount);
|
| | | m_Notice.SetListener(VeiwNotice);
|
| | |
| | | }
|
| | |
|
| | | ChangeUserInfo(model.localSaveAccountName);
|
| | |
|
| | | if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yj
|
| | | && SDKUtility.Yj_AppID.Equals("yybgame")
|
| | | && !model.sdkLogined)
|
| | | {
|
| | | m_EnterGame.gameObject.SetActive(false);
|
| | | m_QQLogin.gameObject.SetActive(true);
|
| | | m_WXLogin.gameObject.SetActive(true);
|
| | |
|
| | | SDKUtility.Instance.onFreePlatformLoginOk += OnLoginOk;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_EnterGame.gameObject.SetActive(true);
|
| | | m_QQLogin.gameObject.SetActive(false);
|
| | | m_WXLogin.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void OnLoginOk(SDKUtility.FP_LoginOk arg0)
|
| | | {
|
| | | if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yj
|
| | | && SDKUtility.Yj_AppID.Equals("yybgame"))
|
| | | {
|
| | | m_EnterGame.gameObject.SetActive(true);
|
| | | m_QQLogin.gameObject.SetActive(false);
|
| | | m_WXLogin.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | {
|
| | | ServerListCenter.Instance.serverSelectEvent -= OnServerChange;
|
| | | ServerListCenter.Instance.onServerListRefreshEvent -= OnServerListRefresh;
|
| | | SDKUtility.Instance.onFreePlatformLoginOk -= OnLoginOk;
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | | Login();
|
| | | }
|
| | |
|
| | | protected void QQLogin()
|
| | | {
|
| | | if (SDKUtility.Instance.ChannelPlatform != SDKUtility.E_ChannelPlatform.Yj)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (!SDKUtility.Yj_AppID.Equals("yybgame"))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | SDKUtility.Instance.TencentLogin("Login");
|
| | | }
|
| | |
|
| | | protected void WXLogin()
|
| | | {
|
| | | if (SDKUtility.Instance.ChannelPlatform != SDKUtility.E_ChannelPlatform.Yj)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (!SDKUtility.Yj_AppID.Equals("yybgame"))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | SDKUtility.Instance.TencentLogin("Loginwx");
|
| | | }
|
| | |
|
| | | protected void Login()
|
| | | {
|
| | | var allow = false;
|
| | |
| | |
|
| | | public void ObjDelBuff(int playerId, int _BuffID)//buff减少
|
| | | {
|
| | | if (playerId != PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (BuffUpdateEvent != null)
|
| | | {
|
| | | BuffUpdateEvent(playerId);
|
| | | }
|
| | | if (playerId != PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | return;
|
| | | } |
| | | if (_BuffDic.ContainsKey(_BuffID))
|
| | | {
|
| | | _BuffDic.Remove(_BuffID);
|
| | |
| | | for (int i = 0; i < MountList.Count; i++)
|
| | | {
|
| | | int SkillminLv = GetSkillLvDis(MountList[i]);
|
| | | if (SkillminLv < GetSkillMinLv)
|
| | | if (SkillminLv < GetSkillMinLv && SkillminLv!=0)
|
| | | {
|
| | | GetSkillMinLv = SkillminLv;
|
| | | }
|
| | |
| | | for (int i = 0; i < MountList.Count; i++)
|
| | | {
|
| | | int SkillLv = GetSkillLvDis(MountList[i]);
|
| | | if (SkillLv > GetSkillMinLv)
|
| | | if (SkillLv > GetSkillMinLv || SkillLv==0)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
| | | private int GetSkillLvDis(int MountId)//获取离升级最近的技能等级
|
| | | {
|
| | | int SkillLv = 0;
|
| | | |
| | | foreach (var key in GetMountSkillAndItem.Keys)
|
| | | {
|
| | | if (_DicHorse.ContainsKey(MountId) && GetMountSkillAndItem[key].HorseID == MountId)
|
| | |
| | | for (int i = 0; i < PetList.Count; i++)
|
| | | {
|
| | | int SkillminLv = GetSkillLvDis(PetList[i]);
|
| | | if (SkillminLv < GetSkillMinLv)
|
| | | if (SkillminLv < GetSkillMinLv && SkillminLv!=0)
|
| | | {
|
| | | GetSkillMinLv = SkillminLv;
|
| | | }
|
| | |
| | | for (int i = 0; i < PetList.Count; i++)
|
| | | {
|
| | | int SkillLv = GetSkillLvDis(PetList[i]);
|
| | | if (SkillLv > GetSkillMinLv)
|
| | | if (SkillLv > GetSkillMinLv || SkillLv==0)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | | _tagMapModel = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | rebornTiredNum = RebornConditions[0];
|
| | | rebornPrice = RebornConditions[2];
|
| | | if (_tagMapModel.MapFBType == 0)
|
| | | {
|
| | | IsCanReborn = true;
|
| | | rebornTiredNum = RebornConditions[0];
|
| | | rebornPrice = RebornConditions[2];
|
| | | //isBossKill = StatusManager.Instance.IsExist((int)playerId,20022);
|
| | | if (!isKillByPlayer && localBossState)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case 31220:
|
| | | if (!WindowCenter.Instance.IsOpen<RebornWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<RebornWin>();
|
| | | }
|
| | | break;
|
| | | default:
|
| | | if (!WindowCenter.Instance.IsOpen<ReliveWin>())
|
| | | {
|
| | |
| | | public static int currentLv { get; private set; }
|
| | | public static int beforeLv { get; private set; }
|
| | | public static int godWeaponType { get; private set; }
|
| | | public static int godWeaponStage { get; private set; }
|
| | | public static int treasureSoulId { get; private set; }
|
| | |
|
| | | private static Dictionary<int, int> lastPropertyDict = new Dictionary<int, int>();
|
| | |
| | | activateType = ActivateFunc.GodWeaponEffect;
|
| | | currentLv = _level;
|
| | | godWeaponType = _type;
|
| | | godWeaponStage = stage;
|
| | | beforeLv = _beforeLevel;
|
| | | skills.Clear();
|
| | | propertyCompares.Clear();
|
| | |
| | | {
|
| | | if (prepareFlySkillEvent != null)
|
| | | {
|
| | | prepareFlySkillEvent(activateType, skills[0]);
|
| | | prepareFlySkillEvent(activateType, skills.Count > 0 ? skills[0] : 0);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | [SerializeField] SkillBehaviour[] m_Skills;
|
| | | [SerializeField] RectTransform m_ContainerNewGotSkill;
|
| | | [SerializeField] SkillBehaviour m_NewGotSkill;
|
| | | [SerializeField] RectTransform m_NewGotSkillPoint;
|
| | | [SerializeField] RectTransform m_ContainerRealm;
|
| | | [SerializeField] RectTransform m_ContainerRealmUp;
|
| | | [SerializeField] RectTransform m_ContainerRealmActivity;
|
| | |
| | | DisplayFightPower();
|
| | | DisplayLv();
|
| | | DisplayGodWeaponEffect();
|
| | | DisplayNewGotSkill();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | void DisplaySkill()
|
| | | {
|
| | | m_ContainerSkill.gameObject.SetActive(ActivateShow.skills.Count > 0);
|
| | | if (ActivateShow.skills.Count == 0)
|
| | | List<int> displaySkills;
|
| | | switch (ActivateShow.activateType)
|
| | | {
|
| | | case ActivateShow.ActivateFunc.GodWeapon:
|
| | | var model = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | displaySkills = model.TryGetDisplaySkillLevels(ActivateShow.godWeaponType);
|
| | | break;
|
| | | default:
|
| | | displaySkills = new List<int>();
|
| | | displaySkills.AddRange(ActivateShow.skills);
|
| | | break;
|
| | | }
|
| | | m_ContainerSkill.gameObject.SetActive(displaySkills.Count > 0);
|
| | | if (displaySkills.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | for (int i = 0; i < m_Skills.Length; i++)
|
| | | {
|
| | | if (i < ActivateShow.skills.Count)
|
| | | if (i < displaySkills.Count)
|
| | | {
|
| | | m_Skills[i].gameObject.SetActive(true);
|
| | | m_Skills[i].Display(ActivateShow.skills[i]);
|
| | | switch (ActivateShow.activateType)
|
| | | {
|
| | | case ActivateShow.ActivateFunc.GodWeapon:
|
| | | var model = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | Dictionary<int, int> dict;
|
| | | if (model.TryGetGodWeaponSkills(ActivateShow.godWeaponType, out dict)
|
| | | && dict.ContainsKey(displaySkills[i]))
|
| | | {
|
| | | m_Skills[i].Display(dict[displaySkills[i]]);
|
| | | }
|
| | | else
|
| | | {
|
| | | var config = GodWeaponEffectConfig.Get(ActivateShow.godWeaponType, displaySkills[i]);
|
| | | if (config != null)
|
| | | {
|
| | | m_Skills[i].DisplayGodWeaponEffect(config);
|
| | | }
|
| | | }
|
| | | break;
|
| | | default:
|
| | | m_Skills[i].Display(displaySkills[i]);
|
| | | break;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | void DisplayNewGotSkill()
|
| | | {
|
| | | m_ContainerNewGotSkill.gameObject.SetActive(ActivateShow.skills.Count > 0);
|
| | | if (ActivateShow.skills.Count == 0)
|
| | | switch (ActivateShow.activateType)
|
| | | {
|
| | | return;
|
| | | case ActivateShow.ActivateFunc.GodWeaponEffect:
|
| | | {
|
| | | m_ContainerNewGotSkill.gameObject.SetActive(true);
|
| | | var model = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | var requireLevel = model.GetGodWeaponStageRequireLevel(ActivateShow.godWeaponType, ActivateShow.godWeaponStage);
|
| | | var config = GodWeaponEffectConfig.Get(ActivateShow.godWeaponType, requireLevel);
|
| | | if (config != null)
|
| | | {
|
| | | m_NewGotSkill.DisplayGodWeaponEffect(config);
|
| | | PrepareFly(config);
|
| | | }
|
| | | }
|
| | | break;
|
| | | default:
|
| | | {
|
| | | m_ContainerNewGotSkill.gameObject.SetActive(ActivateShow.skills.Count > 0);
|
| | | if (ActivateShow.skills.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | m_NewGotSkill.DisplayNewGot(ActivateShow.skills[0]);
|
| | | PrepareFly(ActivateShow.skills[0]);
|
| | | }
|
| | | break;
|
| | | }
|
| | | m_NewGotSkill.DisplayNewGot(ActivateShow.skills[0]);
|
| | | PrepareFly(ActivateShow.skills[0]);
|
| | | }
|
| | |
|
| | | void DisplayTreasureSoul()
|
| | |
| | | flyObject.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | void PrepareFly(GodWeaponEffectConfig config)
|
| | | {
|
| | | ActivateShow.PrepareSkillFly();
|
| | | var instance = UIUtility.CreateWidget("SkillUnlockFlyObject", "SkillUnlockFlyObject");
|
| | | instance.transform.SetParentEx(m_ContainerNewGotFly, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | flyObject = instance.GetComponent<FunctionUnlockFlyObject>();
|
| | | flyObject.SetContent(config);
|
| | | flyObject.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | void SetFlyPosition()
|
| | | {
|
| | | var worldpos = m_NewGotSkillPoint.transform.TransformPoint(Vector3.zero);
|
| | | var localpos = transform.InverseTransformPoint(worldpos);
|
| | | m_ContainerNewGotFly.transform.localPosition = localpos;
|
| | | }
|
| | |
|
| | | private bool startFly = false;
|
| | | private void OnClickClose()
|
| | | {
|
| | |
| | | CloseClick();
|
| | | }
|
| | | break;
|
| | | case ActivateShow.ActivateFunc.GodWeaponEffect:
|
| | | {
|
| | | if (startFly)
|
| | | {
|
| | | return;
|
| | | }
|
| | | startFly = true;
|
| | | StartFlySkill();
|
| | | }
|
| | | break;
|
| | | default:
|
| | | CloseClick();
|
| | | break;
|
| | |
| | |
|
| | | private void StartFlySkill()
|
| | | {
|
| | | SetFlyPosition();
|
| | | if (flyObject != null)
|
| | | {
|
| | | flyObject.gameObject.SetActive(true);
|
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class GodWeaponPreviewCell : CellView
|
| | | {
|
| | | [SerializeField] Image m_Select;
|
| | | [SerializeField] Text m_GodWeaponName;
|
| | | [SerializeField] FunctionButtonConfig buttonConfig;
|
| | |
|
| | | public void Display(int type)
|
| | | {
|
| | | var config = GodWeaponConfig.GetConfig(type, 1);
|
| | | m_GodWeaponName.text = config.Name;
|
| | | m_Select.SetSprite(GodWeaponPreviewWin.selectGodWeaponType == type ?
|
| | | buttonConfig.selected.iconKey : buttonConfig.normal.iconKey);
|
| | | m_GodWeaponName.color = GodWeaponPreviewWin.selectGodWeaponType == type ?
|
| | | buttonConfig.selected.fontColor : buttonConfig.normal.fontColor;
|
| | | m_GodWeaponName.fontSize = GodWeaponPreviewWin.selectGodWeaponType == type ?
|
| | | buttonConfig.selected.fontSize : buttonConfig.normal.fontSize;
|
| | | }
|
| | | }
|
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c6e8c76f636861144aec0e58c4e7387c |
| | | timeCreated: 1546829434 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | [XLua.Hotfix]
|
| | | public class GodWeaponPreviewWin : Window
|
| | | {
|
| | | [SerializeField] Text m_Stage;
|
| | | [SerializeField] ScrollerController m_Controller;
|
| | | [SerializeField] Text m_RequireLevel;
|
| | | [SerializeField] Button[] m_SelectStages;
|
| | | [SerializeField] Transform[] m_EquipSigns;
|
| | | [SerializeField] Image m_Select;
|
| | | [SerializeField] RawImage m_RawModel;
|
| | | [SerializeField] PropertyBehaviour[] m_Propertys;
|
| | | [SerializeField] Text m_FightPower;
|
| | | [SerializeField] Text m_EffectName;
|
| | | [SerializeField] RawImage m_RawEffect;
|
| | | [SerializeField] RectTransform m_ContainerFuncs;
|
| | | [SerializeField] Button m_Equip;
|
| | | [SerializeField] Button m_Putoff;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | int selectStage = 1;
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | | m_Controller.OnRefreshCell += OnRefreshCell;
|
| | | m_Equip.onClick.AddListener(Equip);
|
| | | m_Putoff.onClick.AddListener(PutOff);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | var defaultStage = model.GetGodWeaponStage(selectGodWeaponType);
|
| | | defaultStage = Mathf.Clamp(defaultStage + 1, 1, 3);
|
| | | OnSelectStage(defaultStage);
|
| | | Display();
|
| | | DisplayGodWeaponTypes();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | protected override void OnPreClose()
|
| | | {
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | UI3DModelExhibition.InstanceClone1.StopShow();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | void Display()
|
| | | {
|
| | | var defaultStage = model.GetGodWeaponStage(selectGodWeaponType);
|
| | | defaultStage = Mathf.Clamp(defaultStage + 1, 1, 3);
|
| | | OnSelectStage(defaultStage);
|
| | | DisplayEquip();
|
| | | }
|
| | |
|
| | | void DisplayGodWeaponTypes()
|
| | | {
|
| | | if (m_Controller.GetNumberOfCells(m_Controller.m_Scorller) == 0)
|
| | | {
|
| | | var list = model.godWeaponSorts;
|
| | | m_Controller.Refresh();
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | if (model.godWeaponEffectTypes.Contains(list[i]))
|
| | | {
|
| | | m_Controller.AddCell(ScrollerDataType.Header, list[i], OnGodWeaponSelect);
|
| | | }
|
| | | }
|
| | | m_Controller.Restart();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnRefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | var godWeaponCell = cell as GodWeaponPreviewCell;
|
| | | godWeaponCell.Display(cell.index);
|
| | | }
|
| | |
|
| | | private void OnGodWeaponSelect(CellView cell)
|
| | | {
|
| | | var type = cell.index;
|
| | | if (type != selectGodWeaponType)
|
| | | {
|
| | | selectGodWeaponType = type;
|
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | Display();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnSelectStage(int index)
|
| | | {
|
| | | m_Select.transform.localPosition = m_SelectStages[index - 1].transform.localPosition;
|
| | | selectStage = index;
|
| | | DisplayModel();
|
| | | DisplayStage();
|
| | | DisplayRequireLevel();
|
| | | DisplayProperty();
|
| | | DisplayFightPower();
|
| | | }
|
| | |
|
| | | private void DisplayStage()
|
| | | {
|
| | | var config = GodWeaponConfig.GetConfig(selectGodWeaponType, 1);
|
| | | m_Stage.text = StringUtility.Contact(config.Name, Language.Get("GodWeaponStage", selectStage));
|
| | | DisplayGodWeaponEffect();
|
| | | }
|
| | |
|
| | | private void DisplayRequireLevel()
|
| | |
| | | var requireLevel = model.GetGodWeaponStageRequireLevel(selectGodWeaponType, selectStage);
|
| | | var config = GodWeaponConfig.GetConfig(selectGodWeaponType, 1);
|
| | | m_RequireLevel.text = Language.Get("GodWeaponStageRequireLevel", config.Name, requireLevel);
|
| | | var godWeaponInfo = model.GetGodWeaponInfo(selectGodWeaponType);
|
| | | m_RequireLevel.gameObject.SetActive(godWeaponInfo != null && godWeaponInfo.level < requireLevel);
|
| | | m_ContainerFuncs.gameObject.SetActive(godWeaponInfo != null && godWeaponInfo.level >= requireLevel);
|
| | | }
|
| | |
|
| | | private void DisplayFightPower()
|
| | |
| | | {
|
| | | m_Propertys[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayGodWeaponEffect()
|
| | | {
|
| | | var requireLevel = model.GetGodWeaponStageRequireLevel(selectGodWeaponType, selectStage);
|
| | | var config = GodWeaponEffectConfig.Get(selectGodWeaponType, requireLevel);
|
| | | if (config != null)
|
| | | {
|
| | | m_EffectName.text = config.skillName;
|
| | | }
|
| | | UI3DModelExhibition.InstanceClone1.ShowGodWeaponEffect(selectGodWeaponType, requireLevel, m_RawEffect);
|
| | | }
|
| | |
|
| | | void DisplayEquip()
|
| | | {
|
| | | var equipedLevel = 0;
|
| | | model.IsGodWeaponEffectEquip(selectGodWeaponType, out equipedLevel);
|
| | | for (int i = 0; i < m_EquipSigns.Length; i++)
|
| | | {
|
| | | var stage = i + 1;
|
| | | var requireLevel = model.GetGodWeaponStageRequireLevel(selectGodWeaponType, stage);
|
| | | m_EquipSigns[i].gameObject.SetActive(requireLevel == equipedLevel);
|
| | | }
|
| | | var selectLevel = model.GetGodWeaponStageRequireLevel(selectGodWeaponType, selectStage);
|
| | | m_Equip.gameObject.SetActive(selectLevel != equipedLevel);
|
| | | m_Putoff.gameObject.SetActive(selectLevel == equipedLevel);
|
| | | }
|
| | |
|
| | | private void Equip()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | private void PutOff()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | private void DisplayModel()
|
| | |
| | | {
|
| | | var type = model.godWeaponTypes[i];
|
| | | var godWeaponInfo = model.GetGodWeaponInfo(type);
|
| | | dict.Add(type, godWeaponInfo == null ? 0 : godWeaponInfo.level);
|
| | | var equipedLevel = 0;
|
| | | if (type == selectGodWeaponType)
|
| | | {
|
| | | dict[type] = model.GetGodWeaponStageRequireLevel(selectGodWeaponType, selectStage);
|
| | | }
|
| | | else if (model.IsGodWeaponEffectEquip(type, out equipedLevel))
|
| | | {
|
| | | dict[type] = equipedLevel;
|
| | | }
|
| | | }
|
| | |
|
| | | UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
|
| | |
| | | [SerializeField] Button m_Func;
|
| | | [SerializeField] UIEffect m_Effect;
|
| | |
|
| | | GodWeaponConfig config = null;
|
| | | GodWeaponConfig godWeaponConfig = null;
|
| | | GodWeaponEffectConfig godWeaponEffectConfig = null;
|
| | |
|
| | | MagicianModel model { get { return ModelCenter.Instance.GetModel<MagicianModel>(); } }
|
| | |
|
| | |
| | |
|
| | | public void Display(GodWeaponConfig config)
|
| | | {
|
| | | this.config = config;
|
| | | this.godWeaponConfig = config;
|
| | | this.godWeaponEffectConfig = null;
|
| | | var skillConfig = Config.Instance.Get<SkillConfig>(config.SkillID);
|
| | | m_Effect.StopImediatly();
|
| | | if (config != null && skillConfig != null)
|
| | | {
|
| | | m_SkillIcon.SetSprite(skillConfig.IconName);
|
| | | m_SkillIcon.gameObject.SetActive(true);
|
| | | var active = PlayerDatas.Instance.skill.GetSKillById(skillConfig.SkillID) != null;
|
| | | m_ContainerLock.gameObject.SetActive(!active);
|
| | | m_SkillCondition.gameObject.SetActive(!active);
|
| | |
| | | {
|
| | | m_SkillCondition.text = Language.Get("L1091", config.Lv);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | var effectId = 0;
|
| | | if (model.TryGetGodWeaponSkillEffect(config.SkillID, out effectId))
|
| | | public void Display(GodWeaponEffectConfig config)
|
| | | {
|
| | | this.godWeaponEffectConfig = config;
|
| | | this.godWeaponConfig = null;
|
| | | m_Effect.StopImediatly();
|
| | | if (config != null)
|
| | | {
|
| | | m_SkillIcon.SetSprite(config.icon);
|
| | | var weaponInfo = model.GetGodWeaponInfo(config.type);
|
| | | bool active = weaponInfo != null && weaponInfo.level >= config.level;
|
| | | m_SkillCondition.gameObject.SetActive(!active);
|
| | | m_ContainerLock.gameObject.SetActive(!active);
|
| | | m_SkillIcon.material = active ? MaterialUtility.GetUIDefaultGraphicMaterial() :
|
| | | MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | if (!active)
|
| | | {
|
| | | m_Effect.effect = effectId;
|
| | | m_Effect.Play();
|
| | | m_SkillCondition.text = Language.Get("L1091", config.level);
|
| | | }
|
| | | m_Effect.Play();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnFunc()
|
| | | {
|
| | | if (config != null)
|
| | | if (godWeaponConfig != null)
|
| | | {
|
| | | string extra = StringUtility.Contact("<color=#fa0101>", Language.Get("L1113", config.Name, config.Lv), "</color>");
|
| | | var skillConfig = Config.Instance.Get<SkillConfig>(config.SkillID);
|
| | | SkillDetails.ShowSkillDetails(config.SkillID, SkillDetails.SkillSourceType.MagicianSkill,
|
| | | skillConfig != null ? skillConfig.FightPower : 0, config.Name, extra);
|
| | | string extra = StringUtility.Contact("<color=#fa0101>", Language.Get("L1113", godWeaponConfig.Name, godWeaponConfig.Lv), "</color>");
|
| | | var skillConfig = Config.Instance.Get<SkillConfig>(godWeaponConfig.SkillID);
|
| | | SkillDetails.ShowSkillDetails(godWeaponConfig.SkillID, SkillDetails.SkillSourceType.GodWeaponSkill,
|
| | | skillConfig != null ? skillConfig.FightPower : 0, godWeaponConfig.Name, extra);
|
| | | }
|
| | | else if (godWeaponEffectConfig != null)
|
| | | {
|
| | | var stage = 0;
|
| | | var type = godWeaponEffectConfig.type;
|
| | | if (model.TryGetGodWeaponStage(type, godWeaponEffectConfig.level, out stage))
|
| | | {
|
| | | SkillDetails.ShowGodWeaponEffectSkill(type, stage);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private Dictionary<int, int[]> godWeaponLevelUpCost = new Dictionary<int, int[]>();
|
| | | public List<int> godWeaponTypes { get; private set; }
|
| | | public List<int> godWeaponEffectTypes { get; private set; }
|
| | | public Dictionary<int, string> godWeaponIcons { get; private set; }
|
| | | public Dictionary<int, Dictionary<int, int>> godWeaponSkillDict = new Dictionary<int, Dictionary<int, int>>();
|
| | | Dictionary<int, List<GodWeaponCondition>> godWeaponConditions = new Dictionary<int, List<GodWeaponCondition>>();
|
| | |
| | | Dictionary<int, List<GodWeaponEffectProperty>> effectPropertyDict =
|
| | | new Dictionary<int, List<GodWeaponEffectProperty>>();
|
| | | Dictionary<int, Dictionary<int, int>> effectFightPower = new Dictionary<int, Dictionary<int, int>>();
|
| | | Dictionary<int, int> godWeaponEffectEquipDict = new Dictionary<int, int>();
|
| | | int[] autoHammerExpArea { get; set; }
|
| | | int[] autoHammerCount { get; set; }
|
| | |
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | godWeaponEffectTypes = new List<int>();
|
| | | var godWeaponEffects = Config.Instance.GetAllValues<GodWeaponEffectConfig>();
|
| | | for (int i = 0; i < godWeaponEffects.Count; i++)
|
| | | {
|
| | |
| | | effectFightPower.Add(config.type, dict);
|
| | | }
|
| | | dict.Add(config.level, config.fightPower);
|
| | |
|
| | | if (!godWeaponEffectTypes.Contains(config.type))
|
| | | {
|
| | | godWeaponEffectTypes.Add(config.type);
|
| | | }
|
| | | }
|
| | |
|
| | | funcConfig = Config.Instance.Get<FuncConfigConfig>("MagicExterior");
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | public bool TryGetGodWeaponStage(int type, int level, out int stage)
|
| | | {
|
| | | List<int> list;
|
| | | stage = 0;
|
| | | if (TryGetGodWeaponStages(type, out list))
|
| | | {
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | if (list[i] == level)
|
| | | {
|
| | | stage = i + 1;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetGodWeaponStages(int type, out List<int> stages)
|
| | | {
|
| | | return godWeaponStageDict.TryGetValue(type, out stages);
|
| | |
| | | public bool TryGetGodWeaponSkillEffect(int skillId, out int effect)
|
| | | {
|
| | | return godWeaponSkillEffect.TryGetValue(skillId, out effect);
|
| | | }
|
| | |
|
| | | public bool IsGodWeaponEffectEquip(int type, out int level)
|
| | | {
|
| | | level = 0;
|
| | | if (godWeaponEffectEquipDict.ContainsKey(type))
|
| | | {
|
| | | level = godWeaponEffectEquipDict[type];
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetEffectProperty(int type, int level, out Dictionary<int, int> dict)
|
| | |
| | | }
|
| | | return propertyCacheDict;
|
| | | }
|
| | |
|
| | | public List<int> TryGetDisplaySkillLevels(int type)
|
| | | {
|
| | | List<int> displaySkillLevels = new List<int>();
|
| | | Dictionary<int, int> dict;
|
| | | if (TryGetGodWeaponSkills(type, out dict))
|
| | | {
|
| | | displaySkillLevels.AddRange(dict.Keys);
|
| | | }
|
| | | List<int> list;
|
| | | if (TryGetGodWeaponStages(type, out list))
|
| | | {
|
| | | displaySkillLevels.AddRange(list);
|
| | | }
|
| | | displaySkillLevels.Sort();
|
| | | return displaySkillLevels;
|
| | | }
|
| | | }
|
| | |
|
| | | public class GodWeaponInfo
|
| | |
| | |
|
| | | [SerializeField] RectTransform m_ContainerSkill;
|
| | | [SerializeField] GodWeaponSkillBehaviour[] m_Skills;
|
| | | [SerializeField] HorizontalLayoutGroup m_SkillLayout;
|
| | | [SerializeField] ContentSizeFitter m_SkillSizeFitter;
|
| | | [SerializeField] ScrollRect m_SkillScroller;
|
| | |
|
| | | [SerializeField] RectTransform m_EffectPoint;
|
| | |
|
| | | [SerializeField] ItemCell[] m_Items;
|
| | | [SerializeField] Image m_Select;
|
| | |
| | | DisplaySelectItem();
|
| | | DisplayGodWeaponModel();
|
| | |
|
| | | m_SkillScroller.horizontalNormalizedPosition = 0f;
|
| | |
|
| | | if (flyObjectTarget != null)
|
| | | {
|
| | | Destroy(flyObjectTarget);
|
| | |
| | |
|
| | | private void ComplelteFlySkillEvent(ActivateShow.ActivateFunc type)
|
| | | {
|
| | | if (type == ActivateShow.ActivateFunc.GodWeapon)
|
| | | if (type == ActivateShow.ActivateFunc.GodWeapon
|
| | | || type == ActivateShow.ActivateFunc.GodWeaponEffect)
|
| | | {
|
| | | if (flyObjectTarget != null)
|
| | | {
|
| | |
| | |
|
| | | private void PrepareFlySkillEvent(ActivateShow.ActivateFunc type, int skillId)
|
| | | {
|
| | | var index = 0;
|
| | | if (type == ActivateShow.ActivateFunc.GodWeapon)
|
| | | {
|
| | | var godWeaponType = 0;
|
| | | var index = 0;
|
| | | if (TryGetGodWeaponType(skillId, out godWeaponType, out index))
|
| | | {
|
| | | model.selectType = godWeaponType;
|
| | | flyObjectTarget = m_Skills[index].AddMissingComponent<FunctionUnlockFlyObjectTarget>();
|
| | | flyObjectTarget = m_EffectPoint.AddMissingComponent<FunctionUnlockFlyObjectTarget>();
|
| | | flyObjectTarget.IdList = new int[] { skillId };
|
| | | flyObjectTarget.Z_UnLockType = FunctionUnlockType.Skill;
|
| | | FunctionUnlockFlyObjectTargetCenter.Register(FunctionUnlockType.Skill, new int[] { skillId }, flyObjectTarget);
|
| | | }
|
| | | }
|
| | | else if (type == ActivateShow.ActivateFunc.GodWeaponEffect)
|
| | | {
|
| | | var list = model.TryGetDisplaySkillLevels(ActivateShow.godWeaponType);
|
| | | var godWeaponType = ActivateShow.godWeaponType;
|
| | | var godWeaponStage = ActivateShow.godWeaponStage;
|
| | | var requireLevel = model.GetGodWeaponStageRequireLevel(godWeaponType, godWeaponStage);
|
| | | index = list.IndexOf(requireLevel);
|
| | |
|
| | | model.selectType = godWeaponType;
|
| | | flyObjectTarget = m_EffectPoint.AddMissingComponent<FunctionUnlockFlyObjectTarget>();
|
| | | flyObjectTarget.IdList = new int[] { requireLevel };
|
| | | flyObjectTarget.Z_UnLockType = FunctionUnlockType.GodWeaponEffect;
|
| | | FunctionUnlockFlyObjectTargetCenter.Register(FunctionUnlockType.GodWeaponEffect, new int[] { requireLevel }, flyObjectTarget);
|
| | | }
|
| | |
|
| | | var rt = m_SkillLayout.transform as RectTransform;
|
| | | var rt1 = m_SkillScroller.transform as RectTransform;
|
| | | var delta = m_Skills[index].transform.localPosition.x;
|
| | | var offset = rt.rect.width - rt1.rect.width;
|
| | | delta -= offset;
|
| | | m_SkillScroller.horizontalNormalizedPosition = Mathf.Clamp01(delta / offset);
|
| | |
|
| | | var worldpos = m_Skills[index].transform.TransformPoint(Vector3.zero);
|
| | | var localpos = transform.InverseTransformPoint(worldpos);
|
| | | m_EffectPoint.transform.localPosition = localpos;
|
| | | }
|
| | |
|
| | | private void WindowBeforeCloseEvent(Window window)
|
| | |
| | | DisplaySelectItem();
|
| | | DisplayGodWeaponModel();
|
| | | m_GodWeaponController.m_Scorller.RefreshActiveCellViews();
|
| | |
|
| | | m_SkillScroller.horizontalNormalizedPosition = 0f;
|
| | | }
|
| | |
|
| | | private void GodWeaponUpdate()
|
| | |
| | |
|
| | | private void DisplaySkills()
|
| | | {
|
| | | Dictionary<int, int> skills = null;
|
| | | List<int> displaySkillLevels = new List<int>();
|
| | | Dictionary<int, int> dict;
|
| | | var index = 0;
|
| | | if (model.TryGetGodWeaponSkills(model.selectType, out skills))
|
| | | if (model.TryGetGodWeaponSkills(model.selectType, out dict))
|
| | | {
|
| | | foreach (var level in skills.Keys)
|
| | | displaySkillLevels.AddRange(dict.Keys);
|
| | | }
|
| | | List<int> list;
|
| | | if (model.TryGetGodWeaponStages(model.selectType, out list))
|
| | | {
|
| | | displaySkillLevels.AddRange(list);
|
| | | }
|
| | | displaySkillLevels.Sort();
|
| | | foreach (var level in displaySkillLevels)
|
| | | {
|
| | | if (index < m_Skills.Length)
|
| | | {
|
| | | if (index < m_Skills.Length)
|
| | | m_Skills[index].gameObject.SetActive(true);
|
| | | var godWeaponConfig = GodWeaponConfig.GetConfig(model.selectType, level);
|
| | | var godWeaponEffectConfig = GodWeaponEffectConfig.Get(model.selectType, level);
|
| | | if (dict != null && dict.ContainsKey(level))
|
| | | {
|
| | | m_Skills[index].gameObject.SetActive(true);
|
| | | var config = GodWeaponConfig.GetConfig(model.selectType, level);
|
| | | m_Skills[index].Display(config);
|
| | | index++;
|
| | | m_Skills[index].Display(godWeaponConfig);
|
| | | }
|
| | | else if (list != null && list.Contains(level))
|
| | | {
|
| | | m_Skills[index].Display(godWeaponEffectConfig);
|
| | | }
|
| | | index++;
|
| | | }
|
| | | }
|
| | | for (int i = index; i < m_Skills.Length; i++)
|
| | | {
|
| | | m_Skills[index].gameObject.SetActive(false);
|
| | | m_Skills[i].gameObject.SetActive(false);
|
| | | }
|
| | | m_ContainerSkill.gameObject.SetActive(skills != null && skills.Count > 0);
|
| | | m_ContainerSkill.gameObject.SetActive(displaySkillLevels.Count > 0);
|
| | | m_SkillSizeFitter.horizontalFit = displaySkillLevels.Count > 4 ?
|
| | | ContentSizeFitter.FitMode.PreferredSize : ContentSizeFitter.FitMode.Unconstrained;
|
| | | m_SkillLayout.childAlignment = displaySkillLevels.Count > 4 ?
|
| | | TextAnchor.MiddleLeft : TextAnchor.MiddleCenter;
|
| | | m_SkillScroller.horizontal = displaySkillLevels.Count > 4;
|
| | | if (displaySkillLevels.Count <= 4)
|
| | | {
|
| | | var rt = m_SkillLayout.transform as RectTransform;
|
| | | rt.sizeDelta = rt.sizeDelta.SetX(m_ContainerSkill.rect.width);
|
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayItems()
|
| | |
| | | addValue = addPropertyDict[key];
|
| | | }
|
| | | }
|
| | | m_Propertys[i].DisplayAdd(displayPropertys[i], currentValue, addValue);
|
| | | m_Propertys[i].DisplayGodWeaponAdd(displayPropertys[i], currentValue, addValue);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | foreach (var key in model.godWeaponSkillDict.Keys)
|
| | | {
|
| | | var dict = model.godWeaponSkillDict[key];
|
| | | index = 0;
|
| | | var list = model.TryGetDisplaySkillLevels(key);
|
| | | foreach (var level in dict.Keys)
|
| | | {
|
| | | if (dict[level] == skillId)
|
| | | {
|
| | | type = key;
|
| | | index = list.IndexOf(level);
|
| | | return true;
|
| | | }
|
| | | index++;
|
| | | }
|
| | | }
|
| | | return false;
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | enum AutoHammerState
|
| | | {
|
| | | None,
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void DisplayGodWeaponAdd(int _property, int _value, int _add)
|
| | | {
|
| | | var config = Config.Instance.Get<PlayerPropertyConfig>(_property);
|
| | | if (config != null)
|
| | | {
|
| | | m_PropertyName.text = config.Name;
|
| | | m_PropertyValue.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | if (_add == 0)
|
| | | {
|
| | | m_PropertyAdd.text = string.Empty;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PropertyAdd.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(
|
| | | UIHelper.ReplacePercentage(_add, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
|
| | | config.ISPercentage == 1 ? "%" : string.Empty);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void DisplayCompare(int _property, int _value, int _add)
|
| | | {
|
| | | var config = Config.Instance.Get<PlayerPropertyConfig>(_property);
|
| | |
| | | [SerializeField] Text m_SkillDescription;
|
| | | private int skillId = 0;
|
| | |
|
| | | GodWeaponEffectConfig godWeaponEffectConfig = null;
|
| | |
|
| | | public event Action<int> onClick;
|
| | |
|
| | | private void Awake()
|
| | |
| | | public void Display(int _skillId)
|
| | | {
|
| | | var config = Config.Instance.Get<SkillConfig>(_skillId);
|
| | | godWeaponEffectConfig = null;
|
| | | skillId = 0;
|
| | | if (config != null)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void DisplayGodWeaponEffect(GodWeaponEffectConfig config)
|
| | | {
|
| | | godWeaponEffectConfig = config;
|
| | | m_SkillIcon.SetSprite(config.icon);
|
| | | if (m_SkillName != null)
|
| | | {
|
| | | m_SkillName.text = config.skillName;
|
| | | }
|
| | | if (m_SkillDescription != null)
|
| | | {
|
| | | m_SkillDescription.text = string.Empty;
|
| | | }
|
| | | }
|
| | |
|
| | | public void DisplayNewGot(int _skillId)
|
| | | {
|
| | | var config = Config.Instance.Get<SkillConfig>(_skillId);
|
| | | godWeaponEffectConfig = null;
|
| | | skillId = 0;
|
| | | if (config != null)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | var config = GodWeaponConfig.GetConfig(ActivateShow.godWeaponType, _lv);
|
| | | SkillDetails.ShowSkillDetails(config.SkillID, SkillDetails.SkillSourceType.MagicianSkill, 0, config.Name, string.Empty);
|
| | | SkillDetails.ShowSkillDetails(config.SkillID, SkillDetails.SkillSourceType.GodWeaponSkill, 0, config.Name, string.Empty);
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | onClick(skillId);
|
| | | }
|
| | | }
|
| | |
|
| | | if (godWeaponEffectConfig != null)
|
| | | {
|
| | | switch (ActivateShow.activateType)
|
| | | {
|
| | | case ActivateShow.ActivateFunc.GodWeapon:
|
| | | var _model = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | if (godWeaponEffectConfig != null)
|
| | | {
|
| | | var stage = 0;
|
| | | if (_model.TryGetGodWeaponStage(ActivateShow.godWeaponType, godWeaponEffectConfig.level, out stage))
|
| | | {
|
| | | SkillDetails.ShowGodWeaponEffectSkill(ActivateShow.godWeaponType, stage);
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | [SerializeField] Button _RefineStopBtn;//停止精炼按钮
|
| | | [SerializeField] GameObject _ManagementFrame;//羽翼精炼面板框
|
| | | [SerializeField] RawImage _wingRawImage;//翅膀模型创建
|
| | | [SerializeField] RawImage _wingRawImage2;//翅膀模型创建2
|
| | | [SerializeField] Text _AttrNameTextNum1;//增加的伤害值
|
| | | [SerializeField] Text _AttrNameTextNum2;//增加的生命值
|
| | | [SerializeField] Slider _Pmgressbar;//精炼值
|
| | |
| | | CoroutinesBool = true;
|
| | | IsOpen = false;
|
| | | _wingRawImage.gameObject.SetActive(false);
|
| | | _wingRawImage2.gameObject.SetActive(false);
|
| | | _DevourDIc.Clear();
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
|
| | |
|
| | |
| | | {
|
| | | EquipFirstTxt.SetActive(true);
|
| | | _wingRawImage.gameObject.SetActive(false);
|
| | | _wingRawImage2.gameObject.SetActive(false);
|
| | | WingsImage.gameObject.SetActive(true);
|
| | | IconButton.gameObject.SetActive(false);
|
| | | WingsBG.SetItemBackGround(1);//翅膀框默认颜色值
|
| | |
| | |
|
| | | void ModelCreationDisplay()//模型展示创建
|
| | | {
|
| | | if (_wingRawImage.gameObject.activeSelf)
|
| | | if (_wingRawImage.gameObject.activeSelf || _wingRawImage2.gameObject.activeSelf)
|
| | | {
|
| | | return;
|
| | | }
|
| | | EquipFirstTxt.SetActive(false);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | _wingRawImage.gameObject.SetActive(true);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing); |
| | | var config = Config.Instance.Get<WingRefineExpConfig>((int)itemModel.itemInfo.ItemID);
|
| | | int _modelID = config.Model;
|
| | | UI3DModelExhibition.Instance.ShowWing(_modelID, Vec, _wingRawImage);
|
| | | if (itemModel.itemInfo.ItemID == 3724)
|
| | | {
|
| | | _wingRawImage2.gameObject.SetActive(true);
|
| | | _wingRawImage.gameObject.SetActive(false);
|
| | | UI3DModelExhibition.Instance.ShowWing(_modelID, Vec, _wingRawImage2);
|
| | | }
|
| | | else
|
| | | {
|
| | | _wingRawImage.gameObject.SetActive(true);
|
| | | _wingRawImage2.gameObject.SetActive(false);
|
| | | UI3DModelExhibition.Instance.ShowWing(_modelID, Vec, _wingRawImage);
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | |
|
| | |
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using TableConfig;
|
| | | using System.Text;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class SkillDetails
|
| | | {
|
| | | public static SkillSourceType sourceType { get; private set; }
|
| | |
|
| | | public static SkillConfig skillModel { get; private set; }
|
| | | public static SkillConfig skillConfig { get; private set; }
|
| | |
|
| | | public static List<string> infoList = new List<string>();
|
| | | public static int godWeaponType { get; private set; }
|
| | | public static int godWeaponEffectStage { get; private set; }
|
| | |
|
| | | public static List<string> skillDescriptions = new List<string>();
|
| | |
|
| | | public static string skillSource { get; private set; }
|
| | |
|
| | | public static int fightPower { get; private set; }
|
| | |
|
| | | public static void ShowSkillDetails(int _skillid, SkillSourceType _type, int _fightPower, params string[] _infos)
|
| | | static MagicianModel godWeaponModel
|
| | | {
|
| | | fightPower = _fightPower;
|
| | | sourceType = _type;
|
| | | skillModel = Config.Instance.Get<SkillConfig>(_skillid);
|
| | | infoList.Clear();
|
| | | switch (_type)
|
| | | get { return ModelCenter.Instance.GetModel<MagicianModel>(); }
|
| | | }
|
| | |
|
| | | public static void ShowSkillDetails(int skillId, SkillSourceType type, int fightPower, params string[] infos)
|
| | | {
|
| | | SkillDetails.fightPower = fightPower;
|
| | | sourceType = type;
|
| | | skillConfig = Config.Instance.Get<SkillConfig>(skillId);
|
| | | skillDescriptions.Clear();
|
| | | switch (type)
|
| | | {
|
| | | case SkillSourceType.MagicianSkill:
|
| | | case SkillSourceType.GodWeaponSkill:
|
| | | {
|
| | | skillSource = _infos[0];
|
| | | infoList.Add(skillModel.Description);
|
| | | infoList.Add(_infos[1]);
|
| | | skillSource = infos[0];
|
| | | skillDescriptions.Add(skillConfig.Description);
|
| | | skillDescriptions.Add(infos[1]);
|
| | | }
|
| | | break;
|
| | | case SkillSourceType.PlayerSkill:
|
| | | skillSource = skillModel.SkillName;
|
| | | infoList.Add(skillModel.Description);
|
| | | {
|
| | | skillSource = skillConfig.SkillName;
|
| | | skillDescriptions.Add(skillConfig.Description);
|
| | | }
|
| | | break;
|
| | | case SkillSourceType.PetSkill:
|
| | | if (_infos.Length <= 0)
|
| | | {
|
| | | infoList.Add(skillModel.Description);
|
| | | }
|
| | | else if (_infos.Length == 1)
|
| | | {
|
| | | infoList.Add(_infos[0]);
|
| | | }
|
| | | else if (_infos.Length == 2)
|
| | | {
|
| | | infoList.Add(_infos[0]);
|
| | | infoList.Add(_infos[1]);
|
| | | if (infos.Length <= 0)
|
| | | {
|
| | | skillDescriptions.Add(skillConfig.Description);
|
| | | }
|
| | | else if (infos.Length == 1)
|
| | | {
|
| | | skillDescriptions.Add(infos[0]);
|
| | | }
|
| | | else if (infos.Length == 2)
|
| | | {
|
| | | skillDescriptions.Add(infos[0]);
|
| | | skillDescriptions.Add(infos[1]);
|
| | |
|
| | | }
|
| | | else if (_infos.Length == 3)
|
| | | {
|
| | | infoList.Add(skillModel.Description);
|
| | | infoList.Add(_infos[2]);
|
| | | }
|
| | | else if (infos.Length == 3)
|
| | | {
|
| | | skillDescriptions.Add(skillConfig.Description);
|
| | | skillDescriptions.Add(infos[2]);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case SkillSourceType.ViewHorsePet:
|
| | | infoList.Add(skillModel.Description);
|
| | | infoList.Add(_infos[0]);
|
| | | {
|
| | | skillDescriptions.Add(skillConfig.Description);
|
| | | skillDescriptions.Add(infos[0]);
|
| | | }
|
| | | break;
|
| | | case SkillSourceType.BlastFurnace:
|
| | | skillSource = _infos[0];
|
| | | infoList.Add(skillModel.Description);
|
| | | {
|
| | | skillSource = infos[0];
|
| | | skillDescriptions.Add(skillConfig.Description);
|
| | | }
|
| | | break;
|
| | | case SkillSourceType.DogzSkill:
|
| | | infoList.Add(skillModel.Description);
|
| | | {
|
| | | skillDescriptions.Add(skillConfig.Description);
|
| | | }
|
| | | break;
|
| | | }
|
| | | if (!WindowCenter.Instance.IsOpen<SkillDetailsWin>())
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public static void ShowGodWeaponEffectSkill(int godWeaponType, int stage)
|
| | | {
|
| | | SkillDetails.godWeaponType = godWeaponType;
|
| | | godWeaponEffectStage = stage;
|
| | | sourceType = SkillSourceType.GodWeaponEffectSkill;
|
| | | skillDescriptions.Clear();
|
| | | var dict = godWeaponModel.GetEffectPropertyUpper(godWeaponType, stage);
|
| | | var level = godWeaponModel.GetGodWeaponStageRequireLevel(godWeaponType, stage);
|
| | | fightPower = 0;
|
| | | if (dict != null)
|
| | | {
|
| | | fightPower = UIHelper.GetFightPower(dict);
|
| | | }
|
| | |
|
| | | if (!WindowCenter.Instance.IsOpen<SkillDetailsWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<SkillDetailsWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | public enum SkillSourceType
|
| | | {
|
| | | MagicianSkill = 0,
|
| | | PlayerSkill = 1,
|
| | | PetSkill = 2,
|
| | | BlastFurnace = 3,
|
| | | ViewHorsePet = 4,
|
| | | DogzSkill = 5,
|
| | | GodWeaponSkill,
|
| | | GodWeaponEffectSkill,
|
| | | PlayerSkill,
|
| | | PetSkill,
|
| | | BlastFurnace,
|
| | | ViewHorsePet,
|
| | | DogzSkill,
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | namespace Snxxz.UI {
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class SkillDetailsWin : Window
|
| | | {
|
| | | private RectTransform winRt;
|
| | | private Button btnPopSkillClose;
|
| | | private Image imgSkill;
|
| | | private Text textSkillSource;
|
| | | private Text textSkillName;
|
| | | private Text destText;
|
| | | private ScrollerController m_Control;
|
| | |
|
| | | [SerializeField] Button m_Close;
|
| | | [SerializeField] Image m_SkillIcon;
|
| | | [SerializeField] Text m_SkillInfo1;
|
| | | [SerializeField] Text m_SkillInfo2;
|
| | | [SerializeField] RectTransform m_ContainerDescription;
|
| | | [SerializeField] Text[] m_Descriptions;
|
| | | [SerializeField] RectTransform m_ContaienrFightPower;
|
| | | [SerializeField] Text m_FightPower;
|
| | | [SerializeField] RectTransform m_ContainerGodWeaponEffectSkill;
|
| | | [SerializeField] PropertyBehaviour[] m_Propertys;
|
| | | [SerializeField] Text m_GodWeaponEffectCondition;
|
| | | [SerializeField] RectTransform m_ContainerPlayer;
|
| | | [SerializeField] RawImage m_RawPlayer;
|
| | |
|
| | | public void ShowSkillDetails()
|
| | | {
|
| | | textSkillName.gameObject.SetActive(true);
|
| | | imgSkill.SetSprite(SkillDetails.skillModel.IconName);
|
| | | switch (SkillDetails.sourceType) {
|
| | | case SkillDetails.SkillSourceType.MagicianSkill: {
|
| | | textSkillName.text = SkillDetails.skillModel.SkillName;
|
| | | textSkillSource.text = SkillDetails.skillSource;
|
| | | }
|
| | | break;
|
| | | case SkillDetails.SkillSourceType.PetSkill: {
|
| | | if (SkillDetails.skillModel.CoolDownTime > 0)
|
| | | {
|
| | | textSkillName.text = StringUtility.Contact("CD:", (float)SkillDetails.skillModel.CoolDownTime / 1000, Language.Get("RealmWin_Bewrite_35"));
|
| | | }
|
| | | else
|
| | | {
|
| | | textSkillName.gameObject.SetActive(false);
|
| | | }
|
| | | textSkillSource.text = SkillDetails.skillModel.SkillName;
|
| | | }
|
| | | break;
|
| | | case SkillDetails.SkillSourceType.ViewHorsePet:
|
| | | {
|
| | | if (SkillDetails.skillModel.CoolDownTime > 0)
|
| | | {
|
| | | textSkillName.text = StringUtility.Contact("CD:", (float)SkillDetails.skillModel.CoolDownTime / 1000, Language.Get("RealmWin_Bewrite_35"));
|
| | | }
|
| | | else
|
| | | {
|
| | | textSkillName.gameObject.SetActive(false);
|
| | | }
|
| | | textSkillSource.text = SkillDetails.skillModel.SkillName;
|
| | | }
|
| | | break;
|
| | | case SkillDetails.SkillSourceType.BlastFurnace:
|
| | | {
|
| | | textSkillName.text = SkillDetails.skillModel.SkillName;
|
| | | textSkillSource.text = SkillDetails.skillSource;
|
| | | }
|
| | | break;
|
| | | case SkillDetails.SkillSourceType.DogzSkill:
|
| | | {
|
| | | textSkillSource.text = SkillDetails.skillModel.SkillName;
|
| | | textSkillName.text = Language.Get("PlayerDetail_Level", SkillDetails.skillModel.SkillLV);
|
| | | }
|
| | | break;
|
| | | MagicianModel godWeaponModel { get { return ModelCenter.Instance.GetModel<MagicianModel>(); } }
|
| | |
|
| | | }
|
| | |
|
| | | m_Control.Refresh();
|
| | | for (int i = 0; i < SkillDetails.infoList.Count; i++) {
|
| | | m_Control.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | m_Control.Restart();
|
| | |
|
| | | float size = 185;
|
| | | m_ContaienrFightPower.gameObject.SetActive(SkillDetails.fightPower > 0);
|
| | | if (SkillDetails.fightPower > 0)
|
| | | {
|
| | | m_FightPower.text = StringUtility.Contact("+", SkillDetails.fightPower);
|
| | | size += 100;
|
| | | }
|
| | |
|
| | | for (int i = 0; i < SkillDetails.infoList.Count; i++) {
|
| | | size += m_Control.GetCellViewSize(m_Control.m_Scorller, i);
|
| | | }
|
| | | if (size < 440) {
|
| | | m_Control.maxCellCnt = m_Control.GetNumberOfCells(m_Control.m_Scorller);
|
| | | }
|
| | | winRt.sizeDelta = new Vector2(winRt.sizeDelta.x, Mathf.Min(540, size));
|
| | |
|
| | | |
| | | }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | winRt = transform.Find("BG") as RectTransform;
|
| | |
|
| | | btnPopSkillClose = transform.Find("BG/Close").GetComponent<Button>();
|
| | | imgSkill = transform.Find("BG/SkillBG/Skill").GetComponent<Image>();
|
| | | textSkillSource = transform.Find("BG/Source").GetComponent<Text>();
|
| | | textSkillName = transform.Find("BG/SkillName").GetComponent<Text>();
|
| | |
|
| | | destText = this.GetComponent<Text>("BG/InfoCell");
|
| | |
|
| | | m_Control = this.GetComponent<ScrollerController>("BG/Controll");
|
| | | m_Control.OnRefreshCell += OnRefreshInfoCell;
|
| | | m_Control.OnGetDynamicSize += OnGetDynamicSize;
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | btnPopSkillClose.onClick.AddListener(CloseClick);
|
| | | m_Close.onClick.AddListener(CloseClick);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | ShowSkillDetails();
|
| | | m_ContainerGodWeaponEffectSkill.gameObject.SetActive(false);
|
| | | m_ContainerDescription.gameObject.SetActive(false);
|
| | | m_ContainerPlayer.gameObject.SetActive(false);
|
| | | switch (SkillDetails.sourceType)
|
| | | {
|
| | | case SkillDetails.SkillSourceType.GodWeaponEffectSkill:
|
| | | DisplayGodWeaponEffectSkill();
|
| | | break;
|
| | | default:
|
| | | DisplayNormal();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | |
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | private void OnRefreshInfoCell(ScrollerDataType type, CellView cell)
|
| | | void DisplayNormal()
|
| | | {
|
| | | if (cell.index < SkillDetails.infoList.Count) {
|
| | | Text text = cell.GetComponent<Text>();
|
| | | text.text = SkillDetails.infoList[cell.index];
|
| | | m_SkillInfo2.gameObject.SetActive(true);
|
| | | m_ContainerDescription.gameObject.SetActive(true);
|
| | | m_SkillIcon.SetSprite(SkillDetails.skillConfig.IconName);
|
| | |
|
| | | switch (SkillDetails.sourceType)
|
| | | {
|
| | | case SkillDetails.SkillSourceType.GodWeaponSkill:
|
| | | {
|
| | | m_SkillInfo2.text = SkillDetails.skillConfig.SkillName;
|
| | | m_SkillInfo1.text = SkillDetails.skillSource;
|
| | | }
|
| | | break;
|
| | | case SkillDetails.SkillSourceType.PetSkill:
|
| | | {
|
| | | if (SkillDetails.skillConfig.CoolDownTime > 0)
|
| | | {
|
| | | m_SkillInfo2.text = StringUtility.Contact("CD:", (float)SkillDetails.skillConfig.CoolDownTime / 1000, Language.Get("RealmWin_Bewrite_35"));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_SkillInfo2.gameObject.SetActive(false);
|
| | | }
|
| | | m_SkillInfo1.text = SkillDetails.skillConfig.SkillName;
|
| | | }
|
| | | break;
|
| | | case SkillDetails.SkillSourceType.ViewHorsePet:
|
| | | {
|
| | | if (SkillDetails.skillConfig.CoolDownTime > 0)
|
| | | {
|
| | | m_SkillInfo2.text = StringUtility.Contact("CD:", (float)SkillDetails.skillConfig.CoolDownTime / 1000, Language.Get("RealmWin_Bewrite_35"));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_SkillInfo2.gameObject.SetActive(false);
|
| | | }
|
| | | m_SkillInfo1.text = SkillDetails.skillConfig.SkillName;
|
| | | }
|
| | | break;
|
| | | case SkillDetails.SkillSourceType.BlastFurnace:
|
| | | {
|
| | | m_SkillInfo2.text = SkillDetails.skillConfig.SkillName;
|
| | | m_SkillInfo1.text = SkillDetails.skillSource;
|
| | | }
|
| | | break;
|
| | | case SkillDetails.SkillSourceType.DogzSkill:
|
| | | {
|
| | | m_SkillInfo1.text = SkillDetails.skillConfig.SkillName;
|
| | | m_SkillInfo2.text = Language.Get("PlayerDetail_Level", SkillDetails.skillConfig.SkillLV);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | DisplayDescriptions();
|
| | |
|
| | | DisplayFightPower();
|
| | | }
|
| | |
|
| | | void DisplayGodWeaponEffectSkill()
|
| | | {
|
| | | m_ContainerGodWeaponEffectSkill.gameObject.SetActive(true);
|
| | | m_ContainerPlayer.gameObject.SetActive(true);
|
| | | var level = godWeaponModel.GetGodWeaponStageRequireLevel(SkillDetails.godWeaponType, SkillDetails.godWeaponEffectStage);
|
| | | var godWeaponEffectConfig = GodWeaponEffectConfig.Get(SkillDetails.godWeaponType, level);
|
| | | var config = GodWeaponConfig.GetConfig(SkillDetails.godWeaponType, 1);
|
| | | m_SkillIcon.SetSprite(godWeaponEffectConfig.icon);
|
| | | m_SkillInfo1.text = Language.Get("GodWeaponEffectSource", config.Name);
|
| | | m_SkillInfo2.text = godWeaponEffectConfig.skillName;
|
| | |
|
| | | var dict = godWeaponModel.GetEffectPropertyUpper(SkillDetails.godWeaponType, SkillDetails.godWeaponEffectStage);
|
| | | if (dict != null && dict.Count > 0)
|
| | | {
|
| | | var index = 0;
|
| | | foreach (var key in dict.Keys)
|
| | | {
|
| | | m_Propertys[index].gameObject.SetActive(true);
|
| | | m_Propertys[index].DisplayUpper(key, dict[key]);
|
| | | index++;
|
| | | }
|
| | | for (int i = index; i < m_Propertys.Length; i++)
|
| | | {
|
| | | m_Propertys[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | m_GodWeaponEffectCondition.text = Language.Get("L1113", config.Name, level);
|
| | |
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | var godWeaponDict = new Dictionary<int, int>();
|
| | | godWeaponDict.Add(SkillDetails.godWeaponType, level);
|
| | |
|
| | | var data = new UI3DPlayerExhibitionData()
|
| | | {
|
| | | job = job,
|
| | | godWeapons = godWeaponDict,
|
| | | };
|
| | | UI3DModelExhibition.Instance.ShowOtherPlayer(m_RawPlayer, data);
|
| | |
|
| | | DisplayFightPower();
|
| | | }
|
| | |
|
| | | void DisplayDescriptions()
|
| | | {
|
| | | for (int i = 0; i < m_Descriptions.Length; i++)
|
| | | {
|
| | | m_Descriptions[i].gameObject.SetActive(i < SkillDetails.skillDescriptions.Count);
|
| | | if (i < SkillDetails.skillDescriptions.Count)
|
| | | {
|
| | | m_Descriptions[i].text = SkillDetails.skillDescriptions[i];
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private bool OnGetDynamicSize(ScrollerDataType type, int index, out float height)
|
| | | void DisplayFightPower()
|
| | | {
|
| | | var _content=SkillDetails.infoList[index];
|
| | | destText.text = _content;
|
| | | height = destText.preferredHeight + 3;
|
| | | return true;
|
| | | m_ContaienrFightPower.gameObject.SetActive(SkillDetails.fightPower > 0);
|
| | | if (SkillDetails.fightPower > 0)
|
| | | {
|
| | | m_FightPower.text = StringUtility.Contact("+", SkillDetails.fightPower);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void SetContent(GodWeaponEffectConfig config)
|
| | | {
|
| | | m_UnLockType = FunctionUnlockType.GodWeaponEffect;
|
| | | m_Id = config.level;
|
| | | m_FunctionIcon.SetSprite(config.icon);
|
| | | originalScale = 1f;
|
| | |
|
| | | this.transform.localScale = Vector3.one * originalScale;
|
| | | if (m_Effect != null)
|
| | | {
|
| | | m_Effect.Play();
|
| | | }
|
| | |
|
| | | target = FunctionUnlockFlyObjectTargetCenter.GetTarget(m_UnLockType, m_Id);
|
| | | if (target != null)
|
| | | {
|
| | | target.Prepare();
|
| | | beginMove = false;
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetSpeed(float _speed)
|
| | | {
|
| | | speed = _speed;
|
| | |
| | | [SerializeField] Transform m_NPCShowPoint;
|
| | | [SerializeField] Transform m_DialogPoint;
|
| | | [SerializeField] Transform m_EquipmentPoint;
|
| | | [SerializeField] Transform m_GodWeaponEffectPoint;
|
| | | [SerializeField] Camera m_ShowCamera;
|
| | | [SerializeField] bool m_Interactable = false;
|
| | | [SerializeField] UI3DModelInteractProcessor m_InteractProcessor;
|
| | |
| | |
|
| | | int m_EquipmentModelId = 0;
|
| | | GameObject equipmentModel = null;
|
| | |
|
| | | SFXController godWeaponEffect = null;
|
| | |
|
| | | bool isShowingPlayer = false;
|
| | | bool isShowingHorse = false;
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public void ShowGodWeaponEffect(int type, int level, RawImage _rawImage)
|
| | | {
|
| | | StopShow();
|
| | |
|
| | | m_ShowCamera.enabled = true;
|
| | |
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | var config = GodWeaponEffectConfig.Get(type, level);
|
| | | var effectJson = LitJson.JsonMapper.ToObject(config.effect);
|
| | | var effectId = int.Parse(effectJson[job.ToString()].ToString());
|
| | | godWeaponEffect = SFXPlayUtility.Instance.PlayBattleEffect(effectId, m_GodWeaponEffectPoint);
|
| | |
|
| | | if (godWeaponEffect != null)
|
| | | {
|
| | | godWeaponEffect.transform.localPosition = config.effectPosition;
|
| | | godWeaponEffect.transform.localEulerAngles = config.effectAngles;
|
| | | godWeaponEffect.transform.localScale = config.effectScale;
|
| | | }
|
| | |
|
| | | if (_rawImage != null)
|
| | | {
|
| | | var x = _rawImage.rectTransform.rect.height * 4f / 3;
|
| | | var y = _rawImage.rectTransform.rect.height;
|
| | | _rawImage.rectTransform.sizeDelta = new Vector2(x, y);
|
| | | _rawImage.texture = m_ShowCamera.targetTexture;
|
| | | _rawImage.material = MaterialUtility.GetGUIRenderTextureMaterial();
|
| | | m_InteractProcessor.rectTransform = _rawImage.rectTransform;
|
| | | }
|
| | | }
|
| | |
|
| | | public void StopShow()
|
| | | {
|
| | | m_ShowCamera.enabled = false;
|
| | |
| | | }
|
| | | m_EquipmentModelId = 0;
|
| | | isShowinEquipment = false;
|
| | |
|
| | | if (godWeaponEffect != null)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(godWeaponEffect);
|
| | | godWeaponEffect = null;
|
| | | }
|
| | |
|
| | | interactable = false;
|
| | | }
|
| | |
| | | public bool gray;
|
| | | public bool isDialogue;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
| | |
|
| | | if (StageManager.Instance.CurrentStage != null)
|
| | | {
|
| | | if (Input.GetKeyDown(KeyCode.Escape))
|
| | | if (SDKUtility.Instance.ChannelPlatform != SDKUtility.E_ChannelPlatform.Yj)
|
| | | {
|
| | | if (Input.GetKeyDown(KeyCode.Escape))
|
| | | {
|
| | | #if UNITY_EDITOR
|
| | | WindowCenter.Instance.Open<ExitGameWin>();
|
| | | WindowCenter.Instance.Open<ExitGameWin>();
|
| | | #elif UNITY_ANDROID
|
| | | WindowCenter.Instance.Open<ExitGameWin>();
|
| | | WindowCenter.Instance.Open<ExitGameWin>();
|
| | | #endif
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | private void EnableCanvas(Transform parent, bool _enabled)
|
| | | {
|
| | | Canvas canvas = parent.GetComponent<Canvas>();
|
| | | if (canvas != null) canvas.enabled = _enabled;
|
| | | if (canvas != null)
|
| | | canvas.enabled = _enabled;
|
| | | foreach (Transform child in parent)
|
| | | {
|
| | | EnableCanvas(child, _enabled);
|
| | |
| | | TreasureSkill = 3,
|
| | | Skill = 4,
|
| | | TreasureFunc = 5,
|
| | | GodWeaponEffect,
|
| | | }
|
| | |
|
| | | public enum RedPointState
|
| | |
| | | { |
| | | |
| | | const int timeOut = 20;//秒 |
| | | |
| | | public static DateTime got0102Time = DateTime.MinValue; |
| | | public static DateTime gotA126Time = DateTime.MinValue; |
| | | public static DateTime gotA127Time = DateTime.MinValue; |
| | | public static DateTime got0109Time = DateTime.MinValue; |
| | | public static DateTime send0107Time = DateTime.MinValue; |
| | | |
| | | public static StageLoadTimeOutCatcher Begin(int stageId) |
| | | { |
| | |
| | | var description = StringUtility.Contact( |
| | | "开始时间:", startTime.ToString("HH:mm:ss"), ";", |
| | | "超时时间:", DateTime.Now.ToString("HH:mm:ss"), |
| | | "服务器是否准备中:", StageManager.Instance.isServerPreparing, |
| | | "上一次接收到0109的时间:", got0109Time); |
| | | "0102时间:", got0102Time.ToString("HH:mm:ss"), ";", |
| | | "A126时间:", gotA126Time.ToString("HH:mm:ss"), ";", |
| | | "A127时间:", gotA127Time.ToString("HH:mm:ss"), ";", |
| | | "0109时间:", got0109Time.ToString("HH:mm:ss"), ";", |
| | | "0107时间:", send0107Time.ToString("HH:mm:ss")); |
| | | |
| | | ExceptionCatcher.ReportException(title, description); |
| | | Stop(); |
| | | } |
| | | } |
| | | |
| | | public static void ReportChangeMapRecord(GameNetSystem.SocketType socketType, string protocol, DateTime time) |
| | | { |
| | | try |
| | | { |
| | | var title = StringUtility.Contact("地图加载记录-->协议编号:", protocol); |
| | | var description = StringUtility.Contact("服务器:", socketType, ";", |
| | | "协议编号:", protocol, ";", "时间:", time.ToString("HH:mm:ss"), "玩家:", PlayerDatas.Instance.baseData.PlayerName); |
| | | |
| | | ExceptionCatcher.ReportException(title, description); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |