예제 #1
0
 public override void UpdateUI(GameTime gameTime)
 {
     _lastUpdateUiGameTime = gameTime;
     if (CountdownInterface?.CurrentState != null)
     {
         CountdownInterface.Update(gameTime);
     }
 }
예제 #2
0
        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));
            }
        }