16 lines
618 B
C#
16 lines
618 B
C#
using System.Runtime.CompilerServices;
|
|
using Microsoft.Xna.Framework;
|
|
using Syntriax.Engine.Core;
|
|
|
|
namespace Pong;
|
|
|
|
public static class EngineConverter
|
|
{
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static EngineTime ToEngineTime(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 Vector2 ToVector2(this Vector2D vector) => new(vector.X, vector.Y);
|
|
}
|