chore: updated engine

This commit is contained in:
Syntriax 2025-08-05 19:41:59 +03:00
parent 7a499bbcbc
commit 25caeefb8b
19 changed files with 60 additions and 60 deletions

2
Engine

@ -1 +1 @@
Subproject commit 1644a751bb81ab0f0d467321d1dd5cd2e326227a
Subproject commit 65dcb0c5647484b02767ac9fbcdb397a820d59f6

View File

@ -41,7 +41,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../../Shared/Shared.csproj" />
<ProjectReference Include="..\..\Engine\Engine.Serializers\Engine.Serializers.Yaml\Engine.Serializers.Yaml.csproj" />
<ProjectReference Include="..\..\Engine\Engine.Integration\Engine.Integration.Yaml\Engine.Integration.Yaml.csproj" />
</ItemGroup>
<Target Name="RestoreDotnetTools" BeforeTargets="Restore">
<Message Text="Restoring dotnet tools" Importance="High" />

View File

@ -3,11 +3,11 @@ using System.IO;
using Microsoft.Xna.Framework.Graphics;
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Debug;
using Syntriax.Engine.Core.Serialization;
using Syntriax.Engine.Integration.MonoGame;
using Syntriax.Engine.Serializers.Yaml;
using Engine.Core;
using Engine.Core.Debug;
using Engine.Core.Serialization;
using Engine.Integration.MonoGame;
using Engine.Serializers.Yaml;
Universe universe = new();
@ -39,7 +39,7 @@ monoGameWindow.Graphics.PreferredBackBufferWidth = clientConfiguration.windowWid
monoGameWindow.Graphics.PreferredBackBufferHeight = clientConfiguration.windowHeight;
monoGameWindow.Graphics.GraphicsProfile = GraphicsProfile.HiDef;
universe.FindBehaviour<Syntriax.Engine.Systems.Network.INetworkCommunicatorClient>()?
universe.FindBehaviour<Engine.Systems.Network.INetworkCommunicatorClient>()?
.OnConnectionEstablished.AddOneTimeListener(
(sender, connection) => monoGameWindow.Window.Title = $"Client {connection.Id}"
);

View File

@ -5,8 +5,8 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Syntriax.Engine.Core;
using Syntriax.Engine.Systems.Network;
using Engine.Core;
using Engine.Systems.Network;
namespace Server;

View File

@ -1,8 +1,8 @@
using System;
using System.Threading;
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Debug;
using Engine.Core;
using Engine.Core.Debug;
Universe universe = new();

View File

@ -5,6 +5,8 @@
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Pong.Platforms.Server</RootNamespace>
<AssemblyName>Server</AssemblyName>
</PropertyGroup>
<ItemGroup>

View File

@ -25,9 +25,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Engine.Integration.MonoGame
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Platforms\Server\Server.csproj", "{A15263DB-DF65-4A07-8CA1-33A2919501A0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine.Serializers", "Engine.Serializers", "{F1257AE1-A8BC-DE44-CB86-406F1335A1D0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Engine.Serializers.Yaml", "Engine\Engine.Serializers\Engine.Serializers.Yaml\Engine.Serializers.Yaml.csproj", "{79F870AB-249E-4CA0-9DF0-F265514581DF}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Engine.Integration.Yaml", "Engine\Engine.Integration\Engine.Integration.Yaml\Engine.Integration.Yaml.csproj", "{79F870AB-249E-4CA0-9DF0-F265514581DF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Engine.Integration.LiteNetLib", "Engine\Engine.Integration\Engine.Integration.LiteNetLib\Engine.Integration.LiteNetLib.csproj", "{7AA22306-772F-45F4-8F30-97EBD1FC124D}"
EndProject
@ -174,8 +172,6 @@ Global
{9059393F-4073-9273-0EEC-2B1BA61B620B} = {F7F62670-237A-4C93-A30E-CE661C6FC401}
{7CC31BC4-38EE-40F4-BBBA-9FC2F4CF6283} = {9059393F-4073-9273-0EEC-2B1BA61B620B}
{A15263DB-DF65-4A07-8CA1-33A2919501A0} = {FECFFD54-338F-4060-9161-1E5770D1DC33}
{F1257AE1-A8BC-DE44-CB86-406F1335A1D0} = {F7F62670-237A-4C93-A30E-CE661C6FC401}
{79F870AB-249E-4CA0-9DF0-F265514581DF} = {F1257AE1-A8BC-DE44-CB86-406F1335A1D0}
{7AA22306-772F-45F4-8F30-97EBD1FC124D} = {9059393F-4073-9273-0EEC-2B1BA61B620B}
EndGlobalSection
EndGlobal

View File

@ -1,11 +1,11 @@
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Syntriax.Engine.Core;
using Syntriax.Engine.Integration.MonoGame;
using Syntriax.Engine.Systems.Network;
using Syntriax.Engine.Physics2D;
using Syntriax.Engine.Systems.Tween;
using Engine.Core;
using Engine.Integration.MonoGame;
using Engine.Systems.Network;
using Engine.Physics2D;
using Engine.Systems.Tween;
namespace Pong.Behaviours;

View File

@ -1,8 +1,8 @@
using Microsoft.Xna.Framework.Input;
using Syntriax.Engine.Core;
using Syntriax.Engine.Integration.MonoGame;
using Syntriax.Engine.Systems.Input;
using Engine.Core;
using Engine.Integration.MonoGame;
using Engine.Systems.Input;
namespace Pong.Behaviours;

View File

@ -1,9 +1,9 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Integration.MonoGame;
using Engine.Core;
using Engine.Integration.MonoGame;
namespace Pong.Behaviours;
public class DrawableColliderCircle : Syntriax.Engine.Physics2D.Collider2DCircle, IDrawableTriangle
public class DrawableColliderCircle : Engine.Physics2D.Collider2DCircle, IDrawableTriangle
{
private const float CIRCLE_SEGMENT_COUNT = 32f;

View File

@ -1,11 +1,11 @@
using System.Collections.Generic;
using Syntriax.Engine.Core;
using Syntriax.Engine.Integration.MonoGame;
using Engine.Core;
using Engine.Integration.MonoGame;
namespace Pong.Behaviours;
public class DrawableColliderShape : Syntriax.Engine.Physics2D.Collider2DShape, IDrawableTriangle
public class DrawableColliderShape : Engine.Physics2D.Collider2DShape, IDrawableTriangle
{
private readonly IList<Triangle> triangles = [];

View File

@ -1,8 +1,8 @@
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Syntriax.Engine.Core;
using Syntriax.Engine.Integration.MonoGame;
using Engine.Core;
using Engine.Integration.MonoGame;
namespace Pong.Behaviours;

View File

@ -2,11 +2,11 @@ using System;
using Microsoft.Xna.Framework.Input;
using Syntriax.Engine.Core;
using Syntriax.Engine.Systems.Network;
using Syntriax.Engine.Physics2D;
using Syntriax.Engine.Systems.Input;
using Syntriax.Engine.Systems.Tween;
using Engine.Core;
using Engine.Systems.Network;
using Engine.Physics2D;
using Engine.Systems.Input;
using Engine.Systems.Tween;
namespace Pong.Behaviours;

View File

@ -2,13 +2,13 @@ using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Input;
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Debug;
using Syntriax.Engine.Integration.MonoGame;
using Syntriax.Engine.Systems.Network;
using Syntriax.Engine.Systems.Input;
using Syntriax.Engine.Systems.Time;
using Syntriax.Engine.Systems.Tween;
using Engine.Core;
using Engine.Core.Debug;
using Engine.Integration.MonoGame;
using Engine.Systems.Network;
using Engine.Systems.Input;
using Engine.Systems.Time;
using Engine.Systems.Tween;
namespace Pong.Behaviours;

View File

@ -3,10 +3,10 @@ using System;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Debug;
using Syntriax.Engine.Integration.MonoGame;
using Syntriax.Engine.Systems.Network;
using Engine.Core;
using Engine.Core.Debug;
using Engine.Integration.MonoGame;
using Engine.Systems.Network;
namespace Pong.Behaviours;
@ -113,10 +113,10 @@ public class PongManager : Behaviour, INetworkEntity, IFirstFrameUpdate, ILoadCo
private Vector2D GetBallLaunchDirection()
{
const float AllowedRadians = 45f * Syntriax.Engine.Core.Math.DegreeToRadian;
const float AllowedRadians = 45f * Engine.Core.Math.DegreeToRadian;
float rotation = (float)random.NextDouble() * 2f * AllowedRadians - AllowedRadians;
bool isBackwards = (random.Next() % 2) == 1;
return Vector2D.Right.Rotate(isBackwards ? rotation + Syntriax.Engine.Core.Math.Pi : rotation);
return Vector2D.Right.Rotate(isBackwards ? rotation + Engine.Core.Math.Pi : rotation);
}
void IPacketListenerClient<ScorePacket>.OnClientPacketArrived(IConnection sender, ScorePacket packet)

View File

@ -1,4 +1,4 @@
using Syntriax.Engine.Core;
using Engine.Core;
namespace Pong.Behaviours;

View File

@ -1,7 +1,7 @@
using System;
using Syntriax.Engine.Core;
using Syntriax.Engine.Physics2D;
using Engine.Core;
using Engine.Physics2D;
namespace Pong.Behaviours;

View File

@ -4,12 +4,12 @@ using Microsoft.Xna.Framework.Input;
using Pong.Behaviours;
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Factory;
using Syntriax.Engine.Integration.MonoGame;
using Syntriax.Engine.Systems.Network;
using Syntriax.Engine.Physics2D;
using Syntriax.Engine.Systems.Tween;
using Engine.Core;
using Engine.Core.Factory;
using Engine.Integration.MonoGame;
using Engine.Systems.Network;
using Engine.Physics2D;
using Engine.Systems.Tween;
namespace Pong;

View File

@ -2,6 +2,8 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Pong.Shared</RootNamespace>
<AssemblyName>Pong.Shared</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.2.1105">