IAnimator.cs 948 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using XGame.Database;
  3. namespace FL.Battle.Components
  4. {
  5. /// <summary>
  6. /// 动作组件接口
  7. /// </summary>
  8. public interface IAnimator
  9. {
  10. void Play(EAnimationName aniName);
  11. void Play(AnimationPlayArgs args);
  12. }
  13. public struct AnimationPlayArgs
  14. {
  15. public EAnimationName aniName;
  16. /// <summary>
  17. /// 攻击,技能动作默认回退动作
  18. /// 节省一个外部回调
  19. /// 可循环的动作(待机、移动等)该参数无效
  20. /// </summary>
  21. public EAnimationName fallback;
  22. /// <summary>
  23. /// 触发器的时间
  24. /// 单位:毫秒
  25. /// onTrigger不为空且该值大于零小于动作时长时有效
  26. /// </summary>
  27. public int triggerFrame;
  28. /// <summary>
  29. /// 触发器回调
  30. /// </summary>
  31. public Action onTrigger;
  32. public Action onCompleted;
  33. }
  34. }