AnimatorComponent.cs 1.3 KB

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