Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/ArenaCommonLobbyBattleStateObject.cs
gamer147 824309ec44 feat(battle-engine): close the AI-simulation subsystem (verbatim)
Copied the 89 uncopied AI*SimulationUtility/extension files defining the
AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed
the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
2026-06-05 20:30:59 -04:00

58 lines
1.3 KiB
C#

using UnityEngine;
namespace Wizard;
public class ArenaCommonLobbyBattleStateObject : MonoBehaviour
{
public enum eState
{
None,
Won,
Lost,
Next,
Max
}
[SerializeField]
private GameObject _nextBattleMark;
[SerializeField]
private UILabel _winLabel;
[SerializeField]
private UILabel _loseLabel;
[SerializeField]
private UISprite _stateIcon;
[SerializeField]
private UILabel _titleLabel;
private readonly string[] STATE_ICON_SPRITE_NAME_TABLE = new string[4] { "orb_empty", "orb_win", "orb_lose", "orb_empty" };
private readonly int[] STATE_ICON_SPRITE_SIZE_TABLE = new int[4] { 25, 70, 70, 70 };
public eState State { get; private set; }
public bool IsWon => State == eState.Won;
public bool IsLost => State == eState.Lost;
public void ChangeState(eState state)
{
State = state;
_nextBattleMark.SetActive(state == eState.Next);
_winLabel.gameObject.SetActive(state == eState.Won);
_loseLabel.gameObject.SetActive(state == eState.Lost);
_stateIcon.spriteName = STATE_ICON_SPRITE_NAME_TABLE[(int)state];
UISprite stateIcon = _stateIcon;
int width = (_stateIcon.height = STATE_ICON_SPRITE_SIZE_TABLE[(int)state]);
stateIcon.width = width;
}
public void SetTitleText(string text)
{
_titleLabel.text = text;
}
}