bisschen gui bisschen moving timeline
This commit is contained in:
20
CompanyStatsContainer.cs
Normal file
20
CompanyStatsContainer.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Globalization;
|
||||
using Godot;
|
||||
using yourareanaiceo;
|
||||
|
||||
[SceneTree]
|
||||
public partial class CompanyStatsContainer : FoldableContainer
|
||||
{
|
||||
public override void _Ready()
|
||||
{
|
||||
EventBus.CompanyChanged += UpdateCompanyStats;
|
||||
}
|
||||
|
||||
private void UpdateCompanyStats(Company.CompanyStats companyStats)
|
||||
{
|
||||
HypeValue.Text = companyStats.Hype.ToString();
|
||||
MoneyValue.Text = $"${companyStats.Money.ToString("N0", CultureInfo.CurrentCulture)}";
|
||||
WorkersValue.Text = companyStats.Workers.ToString("N0", CultureInfo.CurrentCulture);
|
||||
RunwayValue.Text = companyStats.Runway.ToString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user