Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | |
| | | using System;
|
| | | using System.Collections; |
| | | using Snxxz.UI; |
| | | using TableConfig; |
| | |
| | | if (IsHeroControl) |
| | | { |
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish; |
| | | DTC0102_tagCDBPlayer.afterPlayerDataInitializeEvent += AfterPlayerDataInitializeEvent; |
| | | } |
| | | |
| | | IsPlayerDie = false; |
| | |
| | | pickUpBehaviour = Root.GetComponent<GuardPickupItem>(); |
| | | if (pickUpBehaviour != null) |
| | | { |
| | | Object.DestroyImmediate(pickUpBehaviour); |
| | | UnityEngine.Object.DestroyImmediate(pickUpBehaviour); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | deadModel.AllPlayerDieEvent -= AllPlayerDieEvent; |
| | | deadModel.AllPlayerRebornEvent -= AllPlayerRebornEvent; |
| | | DTC0429_tagObjResetPos.ResetPlayerPosEvent -= ResetPlayerPosEvent; |
| | | DTC0429_tagObjResetPos.ResetPlayerPosEvent -= ResetPlayerPosEvent;
|
| | | DTC0102_tagCDBPlayer.afterPlayerDataInitializeEvent -= AfterPlayerDataInitializeEvent; |
| | | if (IsHeroControl) |
| | | { |
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish; |
| | |
| | | m_Animator.speed = animatorSpeed; |
| | | NextAction = GuardAction_Idle; |
| | | } |
| | | |
| | | guardState = GuardState.Idle; |
| | | IsStateActive = false; |
| | | pickUpBehaviour = null; |
| | | |
| | | base.OnUnit(); |
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void AfterPlayerDataInitializeEvent()
|
| | | {
|
| | | SnxxzGame.Instance.StartCoroutine(Co_RecheckPlayLifeState());
|
| | | }
|
| | |
|
| | | IEnumerator Co_RecheckPlayLifeState()
|
| | | {
|
| | | yield return null;
|
| | | if (guardState == GuardState.Inter)
|
| | | {
|
| | | var hero = PlayerDatas.Instance.hero;
|
| | | if (hero != null)
|
| | | {
|
| | | if (hero.ActorInfo != null && !hero.ActorInfo.serverDie)
|
| | | {
|
| | | IsPlayerDie = false;
|
| | | IsStateActive = true;
|
| | | if (m_Animator)
|
| | | {
|
| | | m_Animator.enabled = true;
|
| | | }
|
| | | SetPosition(hero.Pos.x / 2, hero.Pos.y / 2);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void ReleasePickUpBehaviour() |
| | | { |
| | | if (pickUpBehaviour != null) |
| | |
| | | protected override void OnPreOpen() |
| | | { |
| | | positionType = CrossServerLogin.Instance.oneVsOnePlayerData.myBornPoint; |
| | | DebugEx.LogError(positionType+"服务端的给我的位置"); |
| | | // DebugEx.LogError(positionType+"服务端的给我的位置"); |
| | | CrossServerRewardModel.PkDanLvNow = CrossServerOneVsOnePlayerInfo.Instance.DanLV;
|
| | | PlaceOfBirth(positionType);//从出生位置设置信息 |
| | | _MyBuffSortList.Clear(); |
| | |
| | | }
|
| | | 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_JobTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
|
| | | // m_RankWhatTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
|
| | | m_SegmentTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
|
| | | m_SegmentTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
|
| | | m_RankButton.RemoveAllListeners();
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | var config = Config.Instance.Get<CrossServerArenaConfig>(Danlv);
|
| | | m_SegmentTxt.text = config.Name;
|
| | | if (Danlv >= 24)
|
| | | {
|
| | | m_SegmentTxt.color = new Color32(255, 3, 3, 255);
|
| | | }
|
| | | else if (Danlv < 24 && Danlv > 15)
|
| | | {
|
| | | m_SegmentTxt.color = new Color32(255, 103, 1, 255);
|
| | | }
|
| | | else if (Danlv < 15 && Danlv > 10)
|
| | | {
|
| | | m_SegmentTxt.color = new Color32(218, 72, 213, 255);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_SegmentTxt.color = new Color32(104, 104, 104, 255);
|
| | | }
|
| | | m_SegmentTxt.color= UIHelper.GetDanLVColor(Danlv, false);
|
| | | //if (Danlv >= 24)
|
| | | //{
|
| | | // m_SegmentTxt.color = new Color32(255, 3, 3, 255);
|
| | | //}
|
| | | //else if (Danlv < 24 && Danlv > 15)
|
| | | //{
|
| | | // m_SegmentTxt.color = new Color32(255, 103, 1, 255);
|
| | | //}
|
| | | //else if (Danlv < 15 && Danlv > 10)
|
| | | //{
|
| | | // m_SegmentTxt.color = new Color32(218, 72, 213, 255);
|
| | | //}
|
| | | //else
|
| | | //{
|
| | | // m_SegmentTxt.color = new Color32(104, 104, 104, 255);
|
| | | //}
|
| | | }
|
| | |
|
| | | } |
| | |
| | | {
|
| | | ObjChild.SetActive(true);
|
| | | var config = Config.Instance.Get<KingTreasureItemConfig>(List[i].item.id);
|
| | | var Itemconfig = Config.Instance.Get<ItemConfig>(List[i].item.id);
|
| | | if (config != null)
|
| | | {
|
| | | kingRewardItem.KingText.gameObject.SetActive(true);
|
| | | kingRewardItem.KingText.text = config.qualityName;
|
| | | var Itemconfig = Config.Instance.Get<ItemConfig>(List[i].item.id);
|
| | | kingRewardItem.KingText.text = config.qualityName; |
| | | if (Itemconfig != null)
|
| | | {
|
| | | kingRewardItem.KingText.color = UIHelper.GetUIColor(Itemconfig.ItemColor,false);
|
| | |
| | | kingRewardItem.KingText.gameObject.SetActive(false);
|
| | | }
|
| | | ItemCell _ItemCell = kingRewardItem.ItemCell;
|
| | | UIEffect ui = kingRewardItem.ItemCell.GetComponent<UIEffect>();
|
| | | if (Itemconfig.ItemColor >= 5)
|
| | | {
|
| | | ui.Play();
|
| | | }
|
| | | else
|
| | | {
|
| | | ui.Stop();
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(List[i].item.id, true, (ulong)List[i].item.count, List[i].isBind);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | |
| | | {
|
| | | ObjChild.SetActive(true);
|
| | | var config = Config.Instance.Get<KingTreasureItemConfig>(List[i].ItemId);
|
| | | var Itemconfig = Config.Instance.Get<ItemConfig>(List[i].ItemId);
|
| | | if (config != null)
|
| | | {
|
| | | kingRewardItem.KingText.gameObject.SetActive(true);
|
| | | kingRewardItem.KingText.text = config.qualityName;
|
| | | var Itemconfig = Config.Instance.Get<ItemConfig>(List[i].ItemId);
|
| | | |
| | | if (Itemconfig != null)
|
| | | {
|
| | | kingRewardItem.KingText.color = UIHelper.GetUIColor(Itemconfig.ItemColor, false);
|
| | |
| | | kingRewardItem.KingText.gameObject.SetActive(false);
|
| | | }
|
| | | ItemCell _ItemCell = kingRewardItem.ItemCell;
|
| | | UIEffect ui = kingRewardItem.ItemCell.GetComponent<UIEffect>();
|
| | | if (Itemconfig.ItemColor >= 5)
|
| | | {
|
| | | ui.Play();
|
| | | }
|
| | | else
|
| | | {
|
| | | ui.Stop();
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(List[i].ItemId, true, (ulong)List[i].ItemNumber, List[i].Isbind);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|