Remove most usages of obsolete TransformComponent methods (#19571)

This commit is contained in:
Visne
2023-08-30 04:05:19 +02:00
committed by GitHub
parent 3ba60835ec
commit 1416942bea
91 changed files with 312 additions and 221 deletions

View File

@@ -44,6 +44,7 @@ public sealed class DragDropSystem : SharedDragDropSystem
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
private ISawmill _sawmill = default!;
@@ -253,9 +254,7 @@ public sealed class DragDropSystem : SharedDragDropSystem
// keep it on top of everything
dragSprite.DrawDepth = (int) DrawDepth.Overlays;
if (!dragSprite.NoRotation)
{
Transform(_dragShadow.Value).WorldRotation = Transform(_draggedEntity.Value).WorldRotation;
}
_transform.SetWorldRotation(_dragShadow.Value, _transform.GetWorldRotation(_draggedEntity.Value));
// drag initiated
return;
@@ -536,7 +535,7 @@ public sealed class DragDropSystem : SharedDragDropSystem
if (Exists(_dragShadow))
{
var mousePos = _eyeManager.PixelToMap(_inputManager.MouseScreenPosition);
Transform(_dragShadow.Value).WorldPosition = mousePos.Position;
_transform.SetWorldPosition(_dragShadow.Value, mousePos.Position);
}
}
}