Bugfixy, odstranění nepoužívaných tříd CameraSystem a ITargetingEnemy, přidání dedikované třídy ReturnToMenuElement, předělání pathfinding algoritmu z DFS na BFS, přesun správy obtížnosti do abstraktní třídy Enemy, přidání scriptů pro kompilaci na aplikaci nevyžadující dotnet

This commit is contained in:
Perry 2026-03-25 16:37:18 +01:00
parent ceac37920b
commit e5d746d597
24 changed files with 258 additions and 138 deletions

View file

@ -140,10 +140,13 @@ public class Server {
}
public static void OnPeerDisconnected(NetPeer peer, DisconnectInfo disconnectInfo) {
GameLogic.DeclareWinner(OtherPlayer(Players.Values.First(p => Equals(p.peer, peer))));
if (Players.Count == 2){
GameLogic.DeclareWinner(OtherPlayer(Players.Values.First(p => Equals(p.peer, peer))));
}
if (peer.Tag != null) {
Players.Remove(peer.Id);
Players.Remove(peer.Id);
if (Players.Count == 0){
Stop();
}
}