| | |
| | | |
| | | protected bool SearchActor = false; |
| | | |
| | | private void OnHpChange(uint value) |
| | | private void OnHpChange(ulong value) |
| | | { |
| | | SearchActor = true; |
| | | } |
| | |
| | | {
|
| | | if (_target.ActorInfo.RealHp < _hurtValue)
|
| | | {
|
| | | _hurtValue = _target.ActorInfo.RealHp - 10;
|
| | | _hurtValue = (uint)(_target.ActorInfo.RealHp - 10);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (_pencent > 0.4f)
|
| | | {
|
| | | target.ActorInfo.ReduceHp((uint)_realHurt);
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp(target.ActorInfo.Hp);
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp((uint)target.ActorInfo.Hp);
|
| | | }
|
| | | }
|
| | | else if (target is GA_NpcClientFightBoss)
|
| | |
| | |
|
| | | if (target.ServerInstID == PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp(target.ActorInfo.RealHp);
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp((uint)target.ActorInfo.RealHp);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public uint clientInstID;
|
| | | public byte AttackType;
|
| | | public uint HurtHP;
|
| | | public uint CurHP;
|
| | | public ulong CurHP;
|
| | | public uint CurHPEx;
|
| | | }
|
| | | }
|
| | |
| | | // 主角血量扣除的补充
|
| | | if (_target.ServerInstID == PlayerDatas.Instance.PlayerId)
|
| | | {
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp(_target.ActorInfo.SyncServerHp);
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp((uint)_target.ActorInfo.SyncServerHp);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public sealed override void RefreshLifeBar(uint value) { }
|
| | | public sealed override void RefreshLifeBar(ulong value) { }
|
| | |
|
| | | public override void RequestName()
|
| | | {
|
| | |
| | | } |
| | | } |
| | | |
| | | public override void RefreshLifeBar(uint value) |
| | | public override void RefreshLifeBar(ulong value) |
| | | { |
| | | if (s_HpRefresh != null) |
| | | { |
| | |
| | | m_LifeBar = LifeBar.RequireLifeBar(MP_Name, 0, CameraController.Instance.CameraObject); |
| | | } |
| | | |
| | | public override void RefreshLifeBar(uint value) |
| | | public override void RefreshLifeBar(ulong value) |
| | | { |
| | | if (m_LifeBar) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public override void RefreshLifeBar(uint value) |
| | | public override void RefreshLifeBar(ulong value) |
| | | { |
| | | // 非选中状态下不刷新 |
| | | if (s_HpRefresh != null) |
| | |
| | | m_LifeBar.Set(ActorInfo.RealHp, ActorInfo.RealMaxHp);
|
| | | }
|
| | |
|
| | | public override void RefreshLifeBar(uint value)
|
| | | public override void RefreshLifeBar(ulong value)
|
| | | {
|
| | | if (m_LifeBar)
|
| | | {
|
| | |
| | |
|
| | | public sealed override void RequestLifeBar() { }
|
| | | public sealed override void ReleaseLifeBar() { }
|
| | | public sealed override void RefreshLifeBar(uint value) { }
|
| | | public sealed override void RefreshLifeBar(ulong value) { }
|
| | |
|
| | | public sealed override void RequestName() { }
|
| | | public sealed override void ReleaseName() { }
|
| | |
| | |
|
| | | public sealed override void RequestLifeBar() { }
|
| | | public sealed override void ReleaseLifeBar() { }
|
| | | public sealed override void RefreshLifeBar(uint value)
|
| | | public sealed override void RefreshLifeBar(ulong value)
|
| | | {
|
| | | //#if UNITY_EDITOR
|
| | | // UnityEditor.EditorApplication.isPaused = true;
|
| | |
| | | base.SwitchYellowName(on);
|
| | | }
|
| | |
|
| | | public sealed override void RefreshLifeBar(uint value)
|
| | | public sealed override void RefreshLifeBar(ulong value)
|
| | | {
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | | if (_hero != null && _hero.SelectTarget == this)
|
| | |
| | | {
|
| | | }
|
| | |
|
| | | public sealed override void RefreshLifeBar(uint value) { }
|
| | | public sealed override void RefreshLifeBar(ulong value) { }
|
| | |
|
| | | public sealed override void RequestName()
|
| | | {
|
| | |
| | | {
|
| | | }
|
| | |
|
| | | public sealed override void RefreshLifeBar(uint value)
|
| | | public sealed override void RefreshLifeBar(ulong value)
|
| | | {
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | | if (_hero != null && _hero.SelectTarget == this)
|
| | |
| | | public abstract bool CanAtked();
|
| | | public abstract bool CanAtkedRotate();
|
| | |
|
| | | public abstract void RefreshLifeBar(uint value);
|
| | | public abstract void RefreshLifeBar(ulong value);
|
| | |
|
| | | public void Die(uint killerServerInstID, int configID = 0)
|
| | | {
|
| | |
| | | public class PropValEx |
| | | { |
| | | // 当前值 |
| | | public uint val; |
| | | public ulong val; |
| | | // 最大值 |
| | | public uint max; |
| | | public ulong max; |
| | | // 扩展值 |
| | | public uint valEx; |
| | | // 最大值扩展值 |
| | |
| | | /// <summary> |
| | | /// 血量改变事件 |
| | | /// </summary> |
| | | public event UnityAction<uint> OnHpChange; |
| | | public event UnityAction<ulong> OnHpChange; |
| | | /// <summary> |
| | | /// 血量 |
| | | /// </summary> |
| | | private PropValEx pveHp = new PropValEx(); |
| | | |
| | | private uint _synchp; |
| | | public uint SyncServerHp |
| | | private ulong _synchp; |
| | | public ulong SyncServerHp |
| | | { |
| | | get { return _synchp; } |
| | | set |
| | |
| | | } |
| | | }// 服务端血量Ex的校准值 |
| | | |
| | | public uint Hp |
| | | public ulong Hp |
| | | { |
| | | get |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public uint MaxHp |
| | | public ulong MaxHp |
| | | { |
| | | get |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public uint RealHp |
| | | public ulong RealHp |
| | | { |
| | | get |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public uint RealMaxHp |
| | | public ulong RealMaxHp |
| | | { |
| | | get |
| | | { |