123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.ZoneClient;
- using System;
- public class BattleUnit : BattleObject
- {
- public BattleUnit() { }
- public ZoneUnit ZUnit { get { return ZoneObject as ZoneUnit; } }
- public override void OnAwake(ZoneObject zo)
- {
- base.OnAwake(zo);
- var zu = zo as ZoneUnit;
- zu.OnActionChanged += OnActionChanged;
- zu.OnSkillActionChanged += OnSkillActionChanged;
- zu.OnHPChanged += OnHPChanged;
- zu.OnMPChanged += OnMPChanged;
- zu.OnMaxHPChanged += OnMaxHPChanged;
- zu.OnMaxMPChanged += OnMaxMPChanged;
- zu.OnLaunchSkill += OnLaunchSkill;
- zu.OnBuffAdded += OnBuffAdded;
- zu.OnBuffRemoved += OnBuffRemoved;
- zu.OnBuffChanged += OnBuffChanged;
- //新增层Buff移除
- zu.OnRemoveBuffByOverlayLevel += OnRemoveBuffByOverlayLevel;
- //新增子状态
- zu.OnActionSubStatusChanged += OnActionSubStatusChanged;
- zu.OnDoEvent += OnLayerObjectEvent;
- }
- protected virtual void OnActionSubStatusChanged(ZoneUnit unit, byte status, object evt)
- {
- throw new NotImplementedException();
- }
- protected virtual void OnRemoveBuffByOverlayLevel(ZoneUnit unit, ZoneUnit.BuffState buff)
- {
- throw new NotImplementedException();
- }
- protected virtual void OnBuffChanged(ZoneUnit unit, ZoneUnit.BuffState buff)
- {
- throw new NotImplementedException();
- }
- protected virtual void OnBuffRemoved(ZoneUnit unit, ZoneUnit.BuffState buff)
- {
- throw new NotImplementedException();
- }
- protected virtual void OnBuffAdded(ZoneUnit unit, ZoneUnit.BuffState buff)
- {
- throw new NotImplementedException();
- }
- protected virtual void OnLaunchSkill(ZoneUnit unit, ZoneUnit.SkillState skill, UnitLaunchSkillEvent evt)
- {
- throw new NotImplementedException();
- }
- protected virtual void OnMaxMPChanged(ZoneUnit unit, int oldMaxMP, int newMaxMP)
- {
- throw new NotImplementedException();
- }
- protected virtual void OnMaxHPChanged(ZoneUnit unit, int oldMaxHP, int newMaxHP)
- {
- throw new NotImplementedException();
- }
- protected virtual void OnMPChanged(ZoneUnit unit, int oldMP, int newMP)
- {
- throw new NotImplementedException();
- }
- protected virtual void OnHPChanged(ZoneUnit unit, int oldHP, int newHP)
- {
- throw new NotImplementedException();
- }
- protected virtual void OnSkillActionChanged(ZoneUnit unit, ZoneUnit.SkillState skill, byte index)
- {
- throw new NotImplementedException();
- }
- protected virtual void OnActionChanged(ZoneUnit unit, UnitActionStatus status, object evt)
- {
- }
- protected virtual void OnLayerObjectEvent(ZoneObject obj, CommonAI.Zone.ObjectEvent e)
- {
- /*RegistZoneEvent<BattleHintNumberB2C>((data) =>
- {
- BattleHintNumberB2C evt = data as BattleHintNumberB2C;
- ShowHint(evt.Value, evt.State, evt.TargetObjID);
- });
- RegistZoneEvent<BattleFloatTipsEventB2C>((data) =>
- {
- BattleFloatTipsEventB2C evt = data as BattleFloatTipsEventB2C;
- ShowTipHint(evt.Type);
- });
- RegistZoneEvent<BubbleTipsEventB2C>((data) =>
- {
- BubbleTipsEventB2C evt = data as BubbleTipsEventB2C;
- AddBubbleChat(evt.Msg, 5);
- });*/
- }
- }
|