MoveStart_StartAnimation.cs 801 B

12345678910111213141516171819202122232425262728
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace ET.Client
  5. {
  6. [Event(SceneType.Current)]
  7. public class MoveStart_StartAnimation : AEvent<EventType.MoveStart>
  8. {
  9. protected override async ETTask Run(Scene scene, EventType.MoveStart args)
  10. {
  11. Unit unit = args.Unit;
  12. unit.GetComponent<AnimatorComponent>().AppendCommand(AnimatorComponent.CMDRun);
  13. }
  14. }
  15. [Event(SceneType.Current)]
  16. public class MoveStop_StartAnimation : AEvent<EventType.MoveStop>
  17. {
  18. protected override async ETTask Run(Scene scene, EventType.MoveStop args)
  19. {
  20. Unit unit = args.Unit;
  21. unit.GetComponent<AnimatorComponent>().AppendCommand(AnimatorComponent.CMDStopRun);
  22. }
  23. }
  24. }