GameBootstrap.cs
namespace NiuLai;
/// <summary>Scene root. Builds the grassland on play.</summary>
public sealed class GameBootstrap : Component
{
float _stingIn = 0.4f;
protected override void OnStart()
{
Log.Info( $"[Niu Lai] {GameInfo.Package} {GameInfo.VersionLabel} boot" );
GameFlow.ApplyMouse();
Trophies.Unlock( "five_year" );
}
protected override void OnUpdate()
{
if ( _stingIn > 0f )
{
_stingIn -= Time.Delta;
if ( _stingIn <= 0f && GameFlow.Screen == GameScreen.Title )
GameAudio.PlayTitleSting();
}
Trophies.Tick( Time.Delta );
FilmCut.Tick( Time.Delta );
Chatter.Tick( Time.Delta );
if ( GameFlow.Screen == GameScreen.Playing )
{
GameState.Tick( Time.Delta );
CalfPlayer.Instance?.RefreshPrompt();
Trophies.Evaluate();
}
if ( GameFlow.Screen == GameScreen.Title && Input.Pressed( "Submit" ) )
GameFlow.StartNewGame();
}
}