|
@@ -31,13 +31,13 @@ public class BattleUnit : BattleObject
|
|
|
zu.OnMaxMPChanged += (ZoneUnit unit, int oldMaxMP, int newMaxMP)=> { };
|
|
|
zu.OnLaunchSkill += OnLaunchSkill;
|
|
|
zu.OnBuffAdded += (ZoneUnit unit, ZoneUnit.BuffState buff) => {
|
|
|
- EventSystem.Instance.Publish(BuffChangeEvent.Static.Clone(Id, buff, BuffChangeType.Add));
|
|
|
+ EventSystem.Instance.Publish(BuffChangeEvent.Static.Clone(Id, buff, BuffChangeEvent.BuffOP.Add));
|
|
|
};
|
|
|
zu.OnBuffRemoved += (ZoneUnit unit, ZoneUnit.BuffState buff) => {
|
|
|
- EventSystem.Instance.Publish(BuffChangeEvent.Static.Clone(Id, buff, BuffChangeType.Remove));
|
|
|
+ EventSystem.Instance.Publish(BuffChangeEvent.Static.Clone(Id, buff, BuffChangeEvent.BuffOP.Remove));
|
|
|
};
|
|
|
zu.OnBuffChanged += (ZoneUnit unit, ZoneUnit.BuffState buff) => {
|
|
|
- EventSystem.Instance.Publish(BuffChangeEvent.Static.Clone(Id, buff, BuffChangeType.Change));
|
|
|
+ EventSystem.Instance.Publish(BuffChangeEvent.Static.Clone(Id, buff, BuffChangeEvent.BuffOP.Change));
|
|
|
};
|
|
|
zu.OnRemoveBuffByOverlayLevel += (ZoneUnit unit, ZoneUnit.BuffState buff) => { };
|
|
|
zu.OnActionSubStatusChanged += OnActionSubStatusChanged;
|
|
@@ -77,7 +77,7 @@ public class BattleUnit : BattleObject
|
|
|
var duration = action.ActionTimeArray != null ? action.ActionTimeArray[0] : actdata.TotalTimeMS;
|
|
|
EventSystem.Instance.Publish(PlayAnimatorEvent.Clone(
|
|
|
Id,
|
|
|
- AnimatorEventType.Skill,
|
|
|
+ PlayAnimatorEvent.AniType.Skill,
|
|
|
actdata.ActionName,
|
|
|
duration,
|
|
|
action.ActionSpeed,
|
|
@@ -109,7 +109,7 @@ public class BattleUnit : BattleObject
|
|
|
|
|
|
EventSystem.Instance.Publish(PlayAnimatorEvent.Clone(
|
|
|
Id,
|
|
|
- AnimatorEventType.Skill,
|
|
|
+ PlayAnimatorEvent.AniType.Skill,
|
|
|
item.ActionName,
|
|
|
action.ActionTimeArray[i],
|
|
|
speed, GroupId(),
|
|
@@ -169,11 +169,11 @@ public class BattleUnit : BattleObject
|
|
|
private void registerActionHandler()
|
|
|
{
|
|
|
actionChangeHandler.AddListener(UnitActionStatus.Idle, (_) => {
|
|
|
- EventSystem.Instance.Publish(PlayAnimatorEvent.Clone(Id, AnimatorEventType.Idle));
|
|
|
+ EventSystem.Instance.Publish(PlayAnimatorEvent.Clone(Id, PlayAnimatorEvent.AniType.Idle));
|
|
|
});
|
|
|
|
|
|
var move = actionChangeHandler.AddListener(UnitActionStatus.Move, (o) => {
|
|
|
- EventSystem.Instance.Publish(PlayAnimatorEvent.Clone(Id, AnimatorEventType.Run));
|
|
|
+ EventSystem.Instance.Publish(PlayAnimatorEvent.Clone(Id, PlayAnimatorEvent.AniType.Run));
|
|
|
});
|
|
|
actionChangeHandler.AddListener(UnitActionStatus.Chaos, move);
|
|
|
actionChangeHandler.AddListener(UnitActionStatus.ServerSyncMove, move);
|