Rozsvěcení a zhasínání světel, sprity pro místnosti, indikátory rozsvícených světel, po konci hry je hráč vrácen do hlavního menu

This commit is contained in:
Perry 2026-03-16 20:43:53 +01:00
parent 25a62af483
commit 55fd052072
27 changed files with 338 additions and 113 deletions

View file

@ -6,12 +6,13 @@ using FNAF_Clone.GUI;
using FNAF_Clone.Map;
using GlobalClassLib;
using Microsoft.Xna.Framework;
using MonoGameLibrary.Graphics;
namespace FNAF_Clone;
public static class ClientEnemyManager {
private static Dictionary<int, ClientEnemy> enemies = new();
private static Point cameraCorner = new Point(64, 64);
private static Point cameraCorner = new(64, 64);
private static Action defaultAfterJumpscare = UIManager.ShowDeathScreen;
public static void AddEnemy(ClientEnemy enemy) {
@ -26,25 +27,27 @@ public static class ClientEnemyManager {
(int)type,
"Lurk",
id,
new UIElement(UIManager.EnemyAtlas[0], cameraCorner),
new EnemyUIElement(UIManager.EnemyAtlas["lurk-lit"], UIManager.EnemyAtlas["lurk-unlit"], cameraCorner),
difficulty,
location,
new JumpscareUIElement(UIManager.EnemyAtlas[0], new(0, 0), 3, 2, 2, 0.1f, afterStop:defaultAfterJumpscare)));
new JumpscareUIElement(UIManager.EnemyAtlas["lurk-lit"], new(0, 0), 3, 2, 2, 0.1f, afterStop:defaultAfterJumpscare)
));
break;
case EnemyType.NEKO:
AddEnemy(new ClientEnemy(
(int)type,
"Neko",
id,
new UIElement(UIManager.EnemyAtlas[1], cameraCorner),
new EnemyUIElement(UIManager.EnemyAtlas["neko-lit"], UIManager.EnemyAtlas["neko-unlit"], cameraCorner, 1),
difficulty,
location,
new JumpscareUIElement(UIManager.EnemyAtlas[1], new(0, -30), 3, 2, 2, 0.1f, afterStop:defaultAfterJumpscare)));
new JumpscareUIElement(UIManager.EnemyAtlas["neko-lit"], new(0, -30), 3, 2, 2, 0.1f, afterStop:defaultAfterJumpscare)
));
break;
case EnemyType.SPOT:
UIElement element =
new UIElement([UIManager.EnemyAtlas[2], UIManager.EnemyAtlas[3], UIManager.EnemyAtlas[4], UIManager.EnemyAtlas[5]], cameraCorner);
element.SetTexture(2);
EnemyUIElement element =
new EnemyUIElement([UIManager.EnemyAtlas["spot-awake-lit"], UIManager.EnemyAtlas["spot-asleep-lit"]],[UIManager.EnemyAtlas["spot-awake-unlit"], UIManager.EnemyAtlas["spot-asleep-unlit"]], cameraCorner, 2);
element.SetTexture(true, 1);
AddEnemy(new ClientEnemy(
(int)type,
"Spot",
@ -52,7 +55,8 @@ public static class ClientEnemyManager {
element,
difficulty,
location,
new JumpscareUIElement(UIManager.EnemyAtlas[2], new(0, 0), 3, 2, 2, 0.1f, afterStop:defaultAfterJumpscare)));
new JumpscareUIElement(UIManager.EnemyAtlas["spot-awake-lit"], new(0, 0), 3, 2, 2, 0.1f, afterStop:defaultAfterJumpscare)
));
break;
}
}