123456789101112131415161718192021 |
- using UnityEngine;
- namespace ET.Client
- {
- [Event(SceneType.Current)]
- public class ChangeRotation_SyncGameObjectRotation: AEvent<EventType.ChangeRotation>
- {
- protected override async ETTask Run(Scene scene, EventType.ChangeRotation args)
- {
- Unit unit = args.Unit;
- GameObjectComponent gameObjectComponent = unit.GetComponent<GameObjectComponent>();
- if (gameObjectComponent == null)
- {
- return;
- }
- Transform transform = gameObjectComponent.GameObject.transform;
- transform.rotation = unit.Rotation;
- await ETTask.CompletedTask;
- }
- }
- }
|