Odstraněny nepoužívané proměnné v GameLogic, opraven bug způsobjící nekonečné přehrávání předení, přidána dokumentace

This commit is contained in:
Perry 2026-03-30 19:55:25 +02:00
parent 0b750f05b5
commit 64e270c09d
3 changed files with 2 additions and 9 deletions

View file

@ -1,4 +1,3 @@
using System.Diagnostics;
using GlobalClassLib;
using ONDServer.Enemies;
using ONDServer.Map;
@ -15,10 +14,6 @@ public static class GameLogic {
private static readonly OpportunityTimer gamePhaseTimer = new(60_000);
public static bool NSecondUpdate{ get; private set; } = false;
public static MapTile P1Office;
public static MapTile P2Office;
public static MapTile[] Offices =>[P1Office, P2Office];
public static int OfficeDoorUsage{ get; set; } = 10;
public static int RemoteDoorUsage{ get; set; } = 3;
public static int LightUsage{ get; set; } = 2;
@ -38,8 +33,6 @@ public static class GameLogic {
public static void Init() {
// Create map
MapManager.InitMap();
P1Office = MapManager.Get(10);
P2Office = MapManager.Get(14);
//Send map to client
TileConnector[] connectors = MapManager.GetAllConnectors();
@ -63,7 +56,7 @@ public static class GameLogic {
Server.SendPacket(new MapInitPacket{Connectors = connectorsConverted, UpsideDown = false, YourTiles = p1Tiles.ToArray(), OpponentTiles = p2Tiles.ToArray(), LitTiles = neutralTiles.ToArray()}, Server.P1.Peer);
Server.SendPacket(new MapInitPacket{Connectors = connectorsConverted, UpsideDown = true, YourTiles = p2Tiles.ToArray(), OpponentTiles = p1Tiles.ToArray(), LitTiles = neutralTiles.ToArray()}, Server.P2.Peer);
spawnOrder = [[new SpotEnemy(3), new MareEnemy(3)], [new DashEnemy(6)], [new LurkEnemy(3), new NekoEnemy(3)]];
spawnOrder = [[new SpotEnemy(3), new MareEnemy(3)], [new DashEnemy(6)]];
spawnOrder.ForEach(l => l.ForEach(e => EnemyManager.AddEnemy(e)));
Thread.Sleep(3000);