Engine-Pong/Game/EngineConverter.cs

16 lines
618 B
C#
Raw Normal View History

2024-01-23 12:16:58 +03:00
using System.Runtime.CompilerServices;
using Microsoft.Xna.Framework;
using Syntriax.Engine.Core;
namespace Pong;
2024-01-23 12:17:14 +03:00
public static class EngineConverter
2024-01-23 12:16:58 +03:00
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static EngineTime ToEngineTime(this GameTime gameTime) => new(gameTime.TotalGameTime, gameTime.ElapsedGameTime);
2024-01-23 12:15:24 +03:00
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vector2D ToVector2D(this Vector2 vector) => new(vector.X, vector.Y);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vector2 ToVector2(this Vector2D vector) => new(vector.X, vector.Y);
2024-01-23 12:16:58 +03:00
}