Neue Töne, Reiter mit Anleitung, Klingen geeicht, Sprung, Vorschaubilder aus 3D
Stand von main 262a2009. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,7 @@ namespace GladiatorIdle.Arena
|
||||
double _t;
|
||||
Drawer _drawer;
|
||||
float _drawerK; // 0 zu, 1 offen (gleitet)
|
||||
Drawer _drawerSound; // für den Ton beim Öffnen/Wechseln
|
||||
|
||||
// Meldung nach dem Kampf
|
||||
string[] _toast = Array.Empty<string>();
|
||||
@@ -46,6 +47,7 @@ namespace GladiatorIdle.Arena
|
||||
_hero.Preload();
|
||||
_fx.Calm = AppSettings.ReduceMotion;
|
||||
SoundManager.StartAmbient("music_ludus");
|
||||
SoundManager.PlayAmbience("amb_crowd");
|
||||
}
|
||||
|
||||
public void ShowResult(string[] lines, Color color)
|
||||
@@ -76,6 +78,7 @@ namespace GladiatorIdle.Arena
|
||||
_crowd.Update(dt);
|
||||
_fx.Motes(AppSettings.ReduceMotion ? 0 : 50, Camera.W, Camera.H);
|
||||
_fx.Update(dt);
|
||||
if (_drawer != _drawerSound) { _drawerSound = _drawer; SoundManager.PlayDrawer(); }
|
||||
float target = _drawer == Drawer.None ? 0 : 1;
|
||||
_drawerK += (target - _drawerK) * (1 - MathF.Exp(-dt * 14));
|
||||
if (input.Pressed(Microsoft.Xna.Framework.Input.Keys.Escape) && _drawer != Drawer.None) { _drawer = Drawer.None; input.PrevKeys = input.Keys; }
|
||||
@@ -313,9 +316,12 @@ namespace GladiatorIdle.Arena
|
||||
|
||||
void DrawDrawer(SpriteBatch sb)
|
||||
{
|
||||
float w = _drawer == Drawer.Ludus ? 820 : 1300, x = -w + (w + 40) * Ease(_drawerK);
|
||||
var r = new RectangleF(x, 140, w, Camera.H - 260);
|
||||
// alle Reiter gleich: Inhalt links (1300 breit), Anleitung rechts daneben, beides gleitet herein
|
||||
const float W = 1300, GUIDE = 500;
|
||||
float x = -(W + GUIDE + 20) + (W + GUIDE + 60) * Ease(_drawerK);
|
||||
var r = new RectangleF(x, 140, W, Camera.H - 260);
|
||||
Ui.Panel(sb, r, D.Gold, 0.94f);
|
||||
DrawGuide(sb, new RectangleF(r.Right + 20, r.Y, GUIDE, r.Height));
|
||||
if (_drawer == Drawer.Gladiator) DrawGladiator(sb, r);
|
||||
else if (_drawer == Drawer.Ludus) DrawLudus(sb, r);
|
||||
else if (_drawer == Drawer.Forum) DrawForum(sb, r);
|
||||
@@ -355,7 +361,7 @@ namespace GladiatorIdle.Arena
|
||||
y += 240;
|
||||
if (_ui.Button(sb, new RectangleF(x + 480, y - 22, 220, 44), L.t("char.equipbest"), size: 18))
|
||||
{
|
||||
if (_game.EquipBest() > 0) SoundManager.PlayPurchase();
|
||||
if (_game.EquipBest() > 0) SoundManager.PlayEquip();
|
||||
}
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
@@ -397,9 +403,9 @@ namespace GladiatorIdle.Arena
|
||||
D.Text(sb, Assets.SansBold, 21, L.t(u.Key), new Vector2(row.X + 86, row.Y + 24), Color.White);
|
||||
D.Text(sb, Assets.Sans, 17, string.Format(L.t("ludus.level"), level), new Vector2(row.X + 86, row.Y + 56), D.Sand);
|
||||
string desc = u.Stat is Stat s ? string.Format(L.t("upgrade.trainer.desc"), L.t(TextKeys.Of(s))) : L.t(u.Key + ".desc");
|
||||
D.Text(sb, Assets.Sans, 15, desc.Length > 52 ? desc[..50] + "…" : desc, new Vector2(row.X + 200, row.Y + 56), D.Dim); // i18n-ok
|
||||
D.TextWrap(sb, Assets.Sans, 17, desc, new RectangleF(row.X + 330, row.Y + 14, row.Width - 330 - 260, 64), D.Dim);
|
||||
double cost = _game.UpgradeCost(u.Id);
|
||||
if (_ui.Button(sb, new RectangleF(row.Right - 200, row.Y + 16, 184, 52), NumberFormat.Format(cost), _game.Gold >= cost, size: 20))
|
||||
if (_ui.Button(sb, new RectangleF(row.Right - 240, row.Y + 16, 224, 52), string.Format(L.t("btn.buy"), NumberFormat.Format(cost)), _game.Gold >= cost, size: 19))
|
||||
if (_game.Buy(u.Id)) SoundManager.PlayPurchase();
|
||||
y += 92;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user