自身包含事件类型
#region 事件
public BeAttackHandle onBeAttackHandle;
/// <summary>
/// 属性改变后
/// </summary>
public event AttributeHandle onAttributeChangedHandle;
public BuffDataHandle onBuffAddedHandle;
public BuffHandle onBuffRemovedHandle;
public SimpleHandle onBuffListChangedHandle;
public SimpleHandle onStateChange;
public EnemyChangeHandle onEnemyChangeHandle;
public AIMarkChangeHandle onAIMarkChangeHandle;
public event SetActionHandle OnSetActionEnd;
public EventCenter StaticObjectEvent = new EventCenter();
#endregion
可添加事件类型:
public class StaticObjectEventName
{
///
/// nameof(AnimEventData)
///
public static string OnAnimEvent = "OnAnimEvent";
public static string ImmuneBuffChanged = "ImmuneBuffChanged";
public static string InjectAttackedHit = "InjectAttackedHit";
public static string Attacked = "Attacked";
public static string Moveing = "Moveing";
public static string OnUpdateMovePosition = "OnUpdateMovePosition";
}
当前动画动作类型
Owner.CurrentAvatarType
public enum AvatarActionType
{
None,
Idle,
Walk,
Run,
Attack,
BeHit,
///
/// 击飞
///
BeHitFly,
BeHitFall,
///
/// 起身
///
GetUp,
Lie,
Dead,
SpecialAction,
BlockAction,
///
/// 循环执行的特殊行为
///
SpecialLoop,
Birth,
Action,
///
/// 被控制,通常是buff
///
NotControl
}
//切换动画(动画类型,名字)
Owner.AnimSystem.SetOverwriteAnimation(AvatarActionType.Run, newAni);
添加Buff
Owner.AddBuff(new BuffValueData() {buffId = buffId, second = buffTime});
//是否有Buff
Owner.HasBuff(buffId)
//获取Buff数据
BuffSaveData buffSaveData = Owner.GetBuffSaveData(buffId);
是否有瞄准其他StaticObject
ShootBy.AimTarget.Owner is StaticObject aimTarget
通过动画系统获取骨骼位置
Transform target = aimTarget.AnimSystem.GetTargetTransform(SpineBoneName.BodyEffect);