public override void UpdateUI(GameTime gameTime) { _lastUpdateUiGameTime = gameTime; if (CountdownInterface?.CurrentState != null) { CountdownInterface.Update(gameTime); } }
public override void ModifyInterfaceLayers(List <GameInterfaceLayer> layers) { int mouseTextIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Resource Bars")); if (mouseTextIndex != -1) { layers.Insert(mouseTextIndex, new LegacyGameInterfaceLayer( "TIVCountdown: Countdown Interface", delegate { if (_lastUpdateUiGameTime != null && CountdownInterface?.CurrentState != null) { CountdownInterface.Draw(Main.spriteBatch, _lastUpdateUiGameTime); } return(true); }, InterfaceScaleType.UI)); } }