ChangeRotation_SyncGameObjectRotation.cs 390 B

12345678910111213
  1. using UnityEngine;
  2. namespace ET
  3. {
  4. public class ChangeRotation_SyncGameObjectRotation: AEvent<EventType.ChangeRotation>
  5. {
  6. protected override async ETTask Run(EventType.ChangeRotation args)
  7. {
  8. Transform transform = args.Unit.GetComponent<GameObjectComponent>().GameObject.transform;
  9. transform.rotation = args.Unit.Rotation;
  10. }
  11. }
  12. }