Oprava spawnování monster, optimalizace v CommandProcessor a EventProcessor. Přesunutí některých tříd do vlastních namespaců, pročištění kódu, úpravy formátování, odstranění nepoužívaných souborů a zakomentovaného kódu

This commit is contained in:
Perry 2026-03-28 09:59:31 +01:00
parent e5d746d597
commit 243f071a43
62 changed files with 873 additions and 1217 deletions

View file

@ -1,17 +1,17 @@
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ONDClient.Net;
namespace ONDClient.GUI;
public class LoadingUIElement : TextUIElement {
private Func<string> expectedEndpointGetter;
private readonly Func<string> expectedEndpointGetter;
private Client.ConnectionState lastState = Client.ConnectionState.IDLE;
public LoadingUIElement(Point corner1, SpriteFont font, Func<string> expectedEndpointGetter, Alignment alignment = Alignment.CENTER, bool autoBounds = true) : base(corner1, font, alignment, autoBounds) {
this.expectedEndpointGetter = expectedEndpointGetter;
Active = true;
// Color = Color.LightGray;
}
public override void Update() {
@ -29,9 +29,8 @@ public class LoadingUIElement : TextUIElement {
Text = "Waiting for opponent...";
break;
case Client.ConnectionState.GAME_STARTING:
Text = "Opponent: " + Client.Opponent.username;
Text = "Opponent: " + Client.Opponent.Username;
Color = Color.White;
// ScaleMultiplier = 1.5f;
break;
case Client.ConnectionState.IDLE:
Text = "Idle";