AnimatorComponent.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Mono;
  2. using System.Collections.Generic;
  3. namespace ET.Client
  4. {
  5. [ComponentOf(typeof(Unit))]
  6. public class AnimatorComponent : Entity, IAwake, IUpdate, IDestroy
  7. {
  8. //状态指令
  9. public enum CommandType
  10. {
  11. Idle = 0,
  12. Run,
  13. StopRun,
  14. StopSkill,
  15. Skill0,
  16. Skill1,
  17. Skill2,
  18. Skill3,
  19. Dead
  20. }
  21. public struct Command
  22. {
  23. public CommandType Type;
  24. public Command(CommandType type)
  25. {
  26. this.Type = type;
  27. }
  28. }
  29. [StaticFieldAttribute(typeof(ET.Client.AnimatorComponent))]
  30. public static readonly Command CMDIdle = new Command(CommandType.Idle);
  31. [StaticFieldAttribute(typeof(ET.Client.AnimatorComponent))]
  32. public static readonly Command CMDRun = new Command(CommandType.Run);
  33. [StaticFieldAttribute(typeof(ET.Client.AnimatorComponent))]
  34. public static readonly Command CMDStopRun = new Command(CommandType.StopRun);
  35. //指令队列
  36. public List<Command> Commands = new List<Command>();
  37. public AnimationData AniData;
  38. public AnimationData.AnimationType DoingType;
  39. }
  40. }