From 41f6dba5e4e90e5a5af9861cffdcdbb13114f239 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Sat, 7 Jun 2025 11:00:13 +0300 Subject: [PATCH] chore: removed unnecessary engine converter --- Shared/Behaviours/CircleBehaviour.cs | 1 + Shared/Behaviours/ShapeAABBBehaviour.cs | 1 + Shared/Behaviours/ShapeBehaviour.cs | 1 + Shared/EngineConverter.cs | 23 ----------------------- 4 files changed, 3 insertions(+), 23 deletions(-) delete mode 100644 Shared/EngineConverter.cs diff --git a/Shared/Behaviours/CircleBehaviour.cs b/Shared/Behaviours/CircleBehaviour.cs index c3d74db..d342718 100644 --- a/Shared/Behaviours/CircleBehaviour.cs +++ b/Shared/Behaviours/CircleBehaviour.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Apos.Shapes; using Syntriax.Engine.Core; +using Syntriax.Engine.Integration.MonoGame; namespace Pong.Behaviours; diff --git a/Shared/Behaviours/ShapeAABBBehaviour.cs b/Shared/Behaviours/ShapeAABBBehaviour.cs index 50fe7c4..0ab4fd9 100644 --- a/Shared/Behaviours/ShapeAABBBehaviour.cs +++ b/Shared/Behaviours/ShapeAABBBehaviour.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Apos.Shapes; using Syntriax.Engine.Core; +using Syntriax.Engine.Integration.MonoGame; using Syntriax.Engine.Physics2D; using Syntriax.Engine.Systems.Input; diff --git a/Shared/Behaviours/ShapeBehaviour.cs b/Shared/Behaviours/ShapeBehaviour.cs index 7a6d986..aaa104e 100644 --- a/Shared/Behaviours/ShapeBehaviour.cs +++ b/Shared/Behaviours/ShapeBehaviour.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Apos.Shapes; using Syntriax.Engine.Core; +using Syntriax.Engine.Integration.MonoGame; namespace Pong.Behaviours; diff --git a/Shared/EngineConverter.cs b/Shared/EngineConverter.cs deleted file mode 100644 index 2b0b4ce..0000000 --- a/Shared/EngineConverter.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Runtime.CompilerServices; -using Microsoft.Xna.Framework; -using Syntriax.Engine.Core; - -namespace Pong; - -public static class EngineConverter -{ - public readonly static Vector2D screenScale = Vector2D.Down + Vector2D.Right; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static UniverseTime ToUniverseTime(this GameTime gameTime) => new(gameTime.TotalGameTime, gameTime.ElapsedGameTime); - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2D ToVector2D(this Vector2 vector) => new(vector.X, vector.Y); - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2D ToVector2D(this Point point) => new(point.X, point.Y); - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 ToVector2(this Vector2D vector) => new(vector.X, vector.Y); - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2 ToDisplayVector2(this Vector2D vector) => vector.Scale(screenScale).ToVector2(); - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector2D ApplyDisplayScale(this Vector2D vector) => vector.Scale(screenScale); -}