Přidán indikátor právě aktivní kamery pro oba hráče. Indikátor protivníka se mění podle toho, jestli má zapnutý monitor.

This commit is contained in:
Perry 2026-02-26 16:24:55 +01:00
parent 3049417914
commit 4484b127c5
8 changed files with 60 additions and 9 deletions

View file

@ -63,6 +63,10 @@ public class UIManager {
// }
}
}
monitorScreen.AddElement("eye-player", new UIElement(monitorAtlas[24], monitorScreen["room"+Client.Player.state.camera].Bounds.Item1));
monitorScreen.AddElement("eye-opponent", new UIElement([monitorAtlas[23], monitorAtlas[22]], monitorScreen["room"+Client.Opponent.state.camera].Bounds.Item1));
}
public static void SpawnDoors(TileConnectorProjection[] doors) {
@ -126,10 +130,25 @@ public class UIManager {
public static void ChangeRemoteDoorState((int, int) id, bool state) {
monitorScreen["door"+Math.Max(id.Item1, id.Item2)+"-"+Math.Min(id.Item1, id.Item2)].SetTexture(state ? 1 : 0);
}
public static void ChangeMonitorState(bool state) {
Screen.SetScreen(state ? ScreenTypes.CAMERAS : ScreenTypes.OFFICE);
}
public static void ChangeMonitorStateOpponent(bool state) {
monitorScreen["eye-opponent"].SetTexture(state ? 1 : 0);
}
public static void ChangeCamera(int id) {
monitorScreen["eye-player"].SetPosition(monitorScreen["room"+id].Bounds.Item1);
}
public static void ChangeCameraOpponent(int id) {
monitorScreen["eye-opponent"].SetPosition(monitorScreen["room"+id].Bounds.Item1);
}
// private static Point GetRoomUIPos((int x, int y) pos) {
// return new Point(336 + (32 * pos.x), 144 + (32 * pos.y));
// }
}