Remove ISpriteComponent (#13458)

This commit is contained in:
metalgearsloth
2023-01-15 13:38:53 +11:00
committed by GitHub
parent cd10d6fb5e
commit 02aef68dff
40 changed files with 66 additions and 66 deletions

View File

@@ -71,7 +71,7 @@ public sealed class OrbitVisualsSystem : EntitySystem
{
base.FrameUpdate(frameTime);
foreach (var (orbit, sprite) in EntityManager.EntityQuery<OrbitVisualsComponent, ISpriteComponent>())
foreach (var (orbit, sprite) in EntityManager.EntityQuery<OrbitVisualsComponent, SpriteComponent>())
{
var angle = new Angle(Math.PI * 2 * orbit.Orbit);
var vec = angle.RotateVec(new Vector2(orbit.OrbitDistance, 0));
@@ -114,7 +114,7 @@ public sealed class OrbitVisualsSystem : EntitySystem
};
}
private Animation GetStopAnimation(OrbitVisualsComponent component, ISpriteComponent sprite)
private Animation GetStopAnimation(OrbitVisualsComponent component, SpriteComponent sprite)
{
var length = component.OrbitStopLength;
@@ -125,8 +125,8 @@ public sealed class OrbitVisualsSystem : EntitySystem
{
new AnimationTrackComponentProperty()
{
ComponentType = typeof(ISpriteComponent),
Property = nameof(ISpriteComponent.Offset),
ComponentType = typeof(SpriteComponent),
Property = nameof(SpriteComponent.Offset),
KeyFrames =
{
new AnimationTrackProperty.KeyFrame(sprite.Offset, 0f),
@@ -136,8 +136,8 @@ public sealed class OrbitVisualsSystem : EntitySystem
},
new AnimationTrackComponentProperty()
{
ComponentType = typeof(ISpriteComponent),
Property = nameof(ISpriteComponent.Rotation),
ComponentType = typeof(SpriteComponent),
Property = nameof(SpriteComponent.Rotation),
KeyFrames =
{
new AnimationTrackProperty.KeyFrame(sprite.Rotation.Reduced(), 0f),