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((data) => { BattleHintNumberB2C evt = data as BattleHintNumberB2C; ShowHint(evt.Value, evt.State, evt.TargetObjID); }); RegistZoneEvent((data) => { BattleFloatTipsEventB2C evt = data as BattleFloatTipsEventB2C; ShowTipHint(evt.Type); }); RegistZoneEvent((data) => { BubbleTipsEventB2C evt = data as BubbleTipsEventB2C; AddBubbleChat(evt.Msg, 5); });*/ } }