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:
parent
ceac37920b
commit
e5d746d597
24 changed files with 258 additions and 138 deletions
|
|
@ -20,13 +20,13 @@ public class Client {
|
|||
CONNECTED,
|
||||
ACCEPTED,
|
||||
GAME_STARTING,
|
||||
DISCONNECTED,
|
||||
GAME_IN_PROGRESS,
|
||||
SERVER_NOT_FOUND,
|
||||
SERVER_FULL,
|
||||
ERROR
|
||||
}
|
||||
}
|
||||
public static string StatusText{ get; private set; }
|
||||
|
||||
public static ConnectionState State { get; private set; } = ConnectionState.IDLE;
|
||||
public static ConnectionState State { get; set; } = ConnectionState.IDLE;
|
||||
|
||||
private static EventBasedNetListener listener = new();
|
||||
private static NetManager client;
|
||||
|
|
@ -68,6 +68,13 @@ public class Client {
|
|||
State = ConnectionState.CONNECTED;
|
||||
SendPacket(new JoinPacket {username = Player.username == "" ? "Anonymous" : Player.username}, DeliveryMethod.ReliableOrdered);
|
||||
};
|
||||
|
||||
listener.PeerDisconnectedEvent += (peer, info) => {
|
||||
State = ConnectionState.IDLE;
|
||||
Console.WriteLine("Disconnected from Server:\n" + info.Reason);
|
||||
State = ConnectionState.DISCONNECTED;
|
||||
StatusText = info.Reason.ToString();
|
||||
};
|
||||
}
|
||||
|
||||
public static void Connect(string endPoint, int port) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue