Power - spotřebovává se když jsou zavřené dveře. Hráči mohou zavírat pouze dveře na svojí polovině mapy. Oprava bugu v MovementOpportunity, který způsoboval zpožďování intervalu.

This commit is contained in:
Perry 2026-03-12 22:33:35 +01:00
parent 7656707177
commit 25a62af483
22 changed files with 240 additions and 59 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices.JavaScript;
using GlobalClassLib;
@ -18,7 +19,7 @@ public class ClientMapManager {
for (int i = 0; i < 5; i++){
for (int j = 0; j < 2; j++){
map[i, j] = new MapTileProjection(CoordsToId(i, j)); // TODO: implement ownership
map[i, j] = new MapTileProjection(CoordsToId(i, j));
}
map[i, 2] = new MapTileProjection(CoordsToId(i, 2));
for (int j = 3; j < 5; j++){
@ -26,8 +27,6 @@ public class ClientMapManager {
}
}
}
public static void InitConnectors(TileConnectorProjection[] connectors) {
@ -42,6 +41,21 @@ public class ClientMapManager {
public static TileConnectorProjection[] GetConnectors(int tileId) => Get(IdToCoords(tileId)).GetAllConnectors();
public static TileConnectorProjection[] GetAllConnectors() {
List<TileConnectorProjection> connectors = new();
for (int i = 0; i < 5; i++){
for (int j = 0; j < 5; j++){
MapTileProjection tile = map[i, j];
Array.ForEach(tile.GetAllConnectors(), c => {
if(tile.Id < c.OtherTile(tile).Id)
connectors.Add(c);
});
}
}
return connectors.ToArray();
}
public const int ID_X_OFFSET = 5; // map grid height