mirror of
https://github.com/Royce551/Water.git
synced 2025-01-22 10:52:00 -05:00
Final touches
This commit is contained in:
parent
37e15d400d
commit
c4489d75f6
2 changed files with 28 additions and 2 deletions
|
@ -291,7 +291,19 @@ namespace FrivoloCo.Screens.Play
|
||||||
foreach (var x in customer.Order)
|
foreach (var x in customer.Order)
|
||||||
{
|
{
|
||||||
if (x.AmountGotten < x.Amount)
|
if (x.AmountGotten < x.Amount)
|
||||||
sb.AppendLine($"{x.Type}");
|
{
|
||||||
|
var name = x.Type switch
|
||||||
|
{
|
||||||
|
ItemType.IceTea => "Ice Tea",
|
||||||
|
ItemType.Espresso => "Espresso",
|
||||||
|
ItemType.FlatWhite => "Flat White",
|
||||||
|
ItemType.Cappuccino => "Cappuccino",
|
||||||
|
ItemType.HotChocolate => "Hot Chocolate",
|
||||||
|
ItemType.Latte => "Latte",
|
||||||
|
_ => "something went horribly wrong"
|
||||||
|
};
|
||||||
|
sb.AppendLine($"{name}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sb.AppendLine($"{customer.Happiness * 100:F1}% happiness");
|
sb.AppendLine($"{customer.Happiness * 100:F1}% happiness");
|
||||||
tb.Text = sb.ToString();
|
tb.Text = sb.ToString();
|
||||||
|
|
|
@ -8,6 +8,8 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Water.Graphics;
|
||||||
|
using Water.Graphics.Containers;
|
||||||
using Water.Graphics.Controls;
|
using Water.Graphics.Controls;
|
||||||
using Water.Graphics.Screens;
|
using Water.Graphics.Screens;
|
||||||
|
|
||||||
|
@ -32,8 +34,20 @@ namespace FrivoloCo.Screens.Play
|
||||||
|
|
||||||
}
|
}
|
||||||
private TextBlock tb;
|
private TextBlock tb;
|
||||||
|
private RenderContainer rc;
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
|
rc = new RenderContainer(Game.GraphicsDevice)
|
||||||
|
{
|
||||||
|
Layout = Water.Graphics.Layout.Fill
|
||||||
|
};
|
||||||
|
AddChild(rc);
|
||||||
|
var co = new Container()
|
||||||
|
{
|
||||||
|
Layout = Layout.Fill,
|
||||||
|
RelativePosition = new(0, 0, 1920, 1080)
|
||||||
|
};
|
||||||
|
rc.AddChild(co);
|
||||||
tb = new TextBlock(new(0, 0, 0, 0), Game.Fonts.Get("Assets/IBMPLEXSANS-MEDIUM.TTF", 90), "", Color.White)
|
tb = new TextBlock(new(0, 0, 0, 0), Game.Fonts.Get("Assets/IBMPLEXSANS-MEDIUM.TTF", 90), "", Color.White)
|
||||||
{
|
{
|
||||||
Layout = Water.Graphics.Layout.Center,
|
Layout = Water.Graphics.Layout.Center,
|
||||||
|
@ -42,7 +56,7 @@ namespace FrivoloCo.Screens.Play
|
||||||
LineSpacing = 110
|
LineSpacing = 110
|
||||||
};
|
};
|
||||||
tb.Text = $"Day\n{state.Day}\nat FrivoloCo!\n\n${state.Money:0..00}";
|
tb.Text = $"Day\n{state.Day}\nat FrivoloCo!\n\n${state.Money:0..00}";
|
||||||
AddChild(Game.AddObject(tb));
|
co.AddChild(Game.AddObject(tb));
|
||||||
MediaPlayer.Stop();
|
MediaPlayer.Stop();
|
||||||
var fx = SoundEffect.FromFile("Assets/Music/gamestart.wav");
|
var fx = SoundEffect.FromFile("Assets/Music/gamestart.wav");
|
||||||
fx.Play();
|
fx.Play();
|
||||||
|
|
Loading…
Reference in a new issue