Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | _player.ActorInfo.ResetHp((int)vNetData.Value); |
| | | break; |
| | | case PlayerDataRefresh.MaxHP: |
| | | _player.ActorInfo.SyncServerHpEx = vNetData.Value; |
| | | _player.ActorInfo.ResetHp(-1, -1, (int)vNetData.Value); |
| | | break; |
| | | case PlayerDataRefresh.Family: |
| | |
| | |
|
| | | public sealed override void RefreshLifeBar(ulong value)
|
| | | {
|
| | | // Debug.LogFormat("{0} 血量改变: {1}", ServerInstID, value);
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | | if (_hero != null && _hero.SelectTarget == this)
|
| | | {
|
| | |
| | | set |
| | | { |
| | | _syncHpex = value; |
| | | //if (sid != PlayerDatas.Instance.PlayerId) |
| | | //{ |
| | | // Debug.LogFormat("<color=green>============ 设置 {1} 血量Ex: {0}</color>", _syncHpex, sid); |
| | | //} |
| | | // if (sid != PlayerDatas.Instance.PlayerId) |
| | | // { |
| | | // Debug.LogFormat("<color=green>============ 设置 {1} 血量Ex: {0}</color>", _syncHpex, sid); |
| | | // } |
| | | } |
| | | }// 服务端血量Ex的校准值 |
| | | |
| | |
| | | MaxHpEx = (ushort)valMaxEx; |
| | | } |
| | | |
| | | //if (sid != PlayerDatas.Instance.PlayerId) |
| | | //{ |
| | | // Debug.LogFormat("<color=yellow>设置NPC {0}, 当前hp: {1}, hpEx: {2}</color>", sid, Hp, HpEx); |
| | | //} |
| | | // if (sid != PlayerDatas.Instance.PlayerId) |
| | | // { |
| | | // Debug.LogFormat("<color=yellow>设置血量 {0}, 当前hp: {1}, hpEx: {2}</color>", sid, Hp, HpEx); |
| | | // } |
| | | |
| | | if (OnHpChange != null) |
| | | { |
| | |
| | | |
| | | // if (sid != PlayerDatas.Instance.PlayerId) |
| | | // { |
| | | // Debug.LogFormat("<color=red>伤血量: {0}, 当前hp: {1}, hpEx: {2}</color>", value, Hp, HpEx); |
| | | // Debug.LogFormat("<color=red> 伤血量: {0}, 当前hp: {1}, hpEx: {2}</color>", value, Hp, HpEx); |
| | | // } |
| | | |
| | | if (_multiple > HpEx) |
| | |
| | | Hp -= value; |
| | | } |
| | | |
| | | // if (sid != PlayerDatas.Instance.PlayerId) |
| | | // { |
| | | // if (HpEx > 0) |
| | | // { |
| | | // Debug.Log("Error"); |
| | | // } |
| | | // } |
| | | |
| | | if (HpEx * FullHp + Hp < SyncServerHpEx * FullHp + SyncServerHp) |
| | | { |
| | | Hp = SyncServerHp; |
| | |
| | | private GameObject m_ClothesModel;
|
| | | private GameObject m_WeaponModel;
|
| | | private GameObject m_SecondaryModel;
|
| | | private GameObject m_HandModel;
|
| | | private GameObject m_WingModel;
|
| | | private GameObject m_HorseModel;
|
| | | private GA_Guard m_Guard;
|
| | |
| | | {
|
| | | case -5:
|
| | | case 0:
|
| | | StateDetermination();
|
| | | bool Bool= StateDetermination();
|
| | | if (Bool)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (mainModel.TaskId_Skill.Contains(Task_ID))
|
| | | {
|
| | | mainModel.TaskSkillID = Task_ID;
|
| | |
| | |
|
| | |
|
| | |
|
| | | private void StateDetermination()//状态判定
|
| | | private bool StateDetermination()//状态判定
|
| | | {
|
| | | bool _bool = false;
|
| | | DropItemManager.StopMissionPickup = true;//主动停止拾取物品
|
| | | if (PlayerDatas.Instance.extersion.bossState == 1)
|
| | | {
|
| | |
| | | if (value.NPCID == npcId && value.MapID != mapID)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("Task_Transfer1");
|
| | | return;
|
| | | _bool = true;
|
| | | return _bool;
|
| | | }
|
| | | }
|
| | | var MonsterConfig = Config.Instance.Get<MonsterRefreshPointConfig>(npcId);
|
| | | if (MonsterConfig != null && MonsterConfig.MapId != mapID)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("Task_Transfer1");
|
| | | return;
|
| | | _bool = true;
|
| | | return _bool;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return _bool;
|
| | | }
|
| | |
|
| | | private void OnClickDeliveryButton()//传送符
|
| | |
| | | [SerializeField] TeamInvitationEntrance m_TeamInvitationEntrance;
|
| | |
|
| | | [SerializeField] FairyCallMemberBehaviour m_FairyCallBehaviour;
|
| | | [SerializeField] MapSwitchingBehaviour m_MapSwitchingBehaviour;
|
| | | #region
|
| | | private int mapId = 0;
|
| | | public delegate void OnChatCallback();//聊天回调
|
| | |
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | m_MapSwitchingBehaviour.InitAwake();
|
| | | recordPositionBool = true;
|
| | | m_TaskAndTeamPanel.localPosition = TaskListTipAnchor1.localPosition;
|
| | | m_CastSkillTip.localPosition = m_position1_S.localPosition;
|
| | |
| | | m_AnimationFadeOut.Init();
|
| | | m_TeamInvitationEntrance.Init();
|
| | | m_FairyCallBehaviour.Init();
|
| | | m_MapSwitchingBehaviour.Init();
|
| | | m_BossBriefInfos.gameObject.SetActive(false);
|
| | | UpdateWishAwardImag();
|
| | | ArticleExperience();//关于经验条
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, November 02, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class MapSwitchingBehaviour:MonoBehaviour {
|
| | | [SerializeField] Button m_Btn_MapSwitch;
|
| | | List<int> MapIdList = new List<int>();
|
| | | DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
|
| | | public void InitAwake()
|
| | | {
|
| | | var config = Config.Instance.Get<FuncConfigConfig>("MapLine").Numerical4;
|
| | | int[] mapList = ConfigParse.GetMultipleStr<int>(config);
|
| | | MapIdList.Clear();
|
| | | for (int i = 0; i < mapList.Length; i++)
|
| | | {
|
| | | MapIdList.Add(mapList[i]);
|
| | | }
|
| | | }
|
| | | public void Init()
|
| | | {
|
| | | int MapID = PlayerDatas.Instance.baseData.MapID;
|
| | | if (MapIdList.Contains(MapID))
|
| | | {
|
| | | m_Btn_MapSwitch.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Btn_MapSwitch.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | private void Awake()
|
| | | {
|
| | | |
| | | } |
| | | private void Start()
|
| | | {
|
| | | m_Btn_MapSwitch.AddListener(OnClickMapSwitch);
|
| | | } |
| | | private void OnEnable()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | |
| | | } |
| | | |
| | | private void OnClickMapSwitch()
|
| | | {
|
| | | if (PlayerDatas.Instance.extersion.bossState == 1)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("Task_Transfer1");
|
| | | return;
|
| | | }
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
|
| | | "What?系不系要退出去", (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | }
|
| | | });
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5a7bad04558b04444bec738226d3bad1 |
| | | timeCreated: 1541144798 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |