Všechna monstra, dynamický targeting. Bugfixy u monster.

This commit is contained in:
Perry 2026-03-17 20:14:29 +01:00
parent 55fd052072
commit 4fdff0a0cc
18 changed files with 345 additions and 43 deletions

View file

@ -30,7 +30,10 @@ public class MenuInputField : UIElement {
textBoxElement.Text = defaultValue;
}
public string Text => textBoxElement.Text;
public string Text{
get => textBoxElement.Text;
set => textBoxElement.Text = value;
}
public override void Draw(SpriteBatch spriteBatch) {
labelElement.Draw(spriteBatch);

View file

@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
using FNAF_Clone.Map;
using GlobalClassLib;
using Microsoft.Xna.Framework;
@ -121,7 +119,6 @@ public class UIManager {
menuScreen.AddElement("host-button",
new TextUIElement(new(connectButton.Bounds.Item1.X, connectButton.Bounds.Item2.Y + 30), PixelMonoFont) {Text = "HOST"});
loadingScreen.AddElement("loading-text", new LoadingUIElement(new(320, 180), PixelMonoFont, field.Text));
}
@ -129,6 +126,8 @@ public class UIManager {
public static void DisplayMainMenu() {
Screen.SetScreen(ScreenTypes.MENU);
CommandManager.AllowGameControls(false);
// if(Client.Player.username != null)
// ((MenuInputField)menuScreen["username-field"]).Text = Client.Player.username;
}
@ -255,7 +254,7 @@ public class UIManager {
public static void UpdateCameras(int[] camIds) {
foreach (var id in camIds){
MapTileProjection tile = ClientMapManager.Get(id);
if(tile.Owner == null) continue;
if(tile.Owner == null || tile.Id == Client.Player.state.officeTileId || tile.Id == Client.Opponent.state.officeTileId) continue;
lightIndicators[id].Visible = tile.Lit;
}
@ -283,6 +282,7 @@ public class UIManager {
Screen.SetScreen(ScreenTypes.OFFICE);
enemy.JumpscareSprite.Play();
timerElement.Stop();
CommandManager.AllowGameControls(false);
// UIElement jumpscareElement = enemy.Sprite.Clone();
// jumpscareElement.ScaleMultiplier = 2;
// jumpscareElement.SetPosition(new Point(0, 0));